#include <sys/wait.h>
#include <stdio.h>
-#ifndef PORT
#define PORT "65018"
-#endif
static void finish_100(struct io_conn *conn, int *state)
{
{
if (*state == 0) {
(*state)++;
- errno = 100;
io_set_finish(conn, finish_100, state);
+ errno = 100;
return io_close(conn);
} else {
ok1(*state == 2);
exit(0);
}
freeaddrinfo(addrinfo);
- ok1(io_loop() == &state + 1);
+ ok1(io_loop(NULL, NULL) == &state + 1);
ok1(state == 4);
io_close_listener(l);
ok1(wait(&state));