- * io_wake(b->reader, read_stdin, b);
- * return io_idle(c);
- * }
- *
- * static struct io_plan write_to_child(struct io_conn *conn,
- * struct stdin_buffer *b)
- * {
- * assert(conn == b->writer);
- * if (!b->reader)
- * return io_close(conn, NULL);
- * return io_write(conn, b->inbuf, b->len, wake_reader, b);
- * }
- *
- * static struct io_plan start_writer(struct io_conn *conn,
- * struct stdin_buffer *b)
- * {
- * assert(conn == b->writer);
- * return io_idle(conn);
+ * if (!b->reader)
+ * return io_close();
+ * b->len = sizeof(b->inbuf);
+ * io_wake(b->reader, io_read_partial(b->inbuf, &b->len, wake_writer, b));
+ * return io_idle();