- * sbuf.reader = io_new_conn(STDIN_FILENO, read_stdin, reader_exit, &sbuf);
- * sbuf.writer = io_new_conn(tochild[1], start_writer, fail_child_write,
- * &sbuf);
- * if (!sbuf.reader || !sbuf.writer
- * || !io_new_conn(fromchild[0], read_from_child, NULL, &out))
- * err(1, "Allocating connections");
+ * // Read from stdin, write to child.
+ * memset(&to, 0, sizeof(to));
+ * reader = io_new_conn(NULL, STDIN_FILENO, read_in, &to);
+ * io_set_finish(reader, finish, &to);
+ * io_new_conn(NULL, tochild[1], write_out, &to);
+ *
+ * // Read from child, write to stdout.
+ * reader = io_new_conn(NULL, fromchild[0], read_in, &from);
+ * io_set_finish(reader, finish, &from);
+ * io_new_conn(NULL, STDOUT_FILENO, write_out, &from);