]> git.ozlabs.org Git - ccan/blobdiff - ccan/io/test/run-13-all-idle.c
ccan/io: eliminate dir argument from io_wait and io_always.
[ccan] / ccan / io / test / run-13-all-idle.c
index 48be71dda7340a0671436aa101bd80edf6fddf4f..3701472b18258b74a0a0d02626c61efdd395e374 100644 (file)
@@ -7,9 +7,9 @@
 #include <stdio.h>
 #include <signal.h>
 
-static struct io_plan *start(struct io_conn *conn, void *unused)
+static struct io_plan *setup_waiter(struct io_conn *conn, int *status)
 {
-       return io_idle(conn);
+       return io_wait(conn, status, io_close_cb, NULL);
 }
 
 int main(void)
@@ -22,7 +22,7 @@ int main(void)
                int fds[2];
 
                ok1(pipe(fds) == 0);
-               io_new_conn(fds[0], start, NULL, NULL);
+               io_new_conn(NULL, fds[0], setup_waiter, &status);
                io_loop();
                exit(1);
        }