diff --git a/src/common/execio.h b/src/common/execio.h --- a/src/common/execio.h +++ b/src/common/execio.h @@ -51,11 +51,11 @@ struct execio int execio_open(struct execio **rem, const char *progname, char *const argv[]); /* - blocks, - returns 0 if len is 0. Otherwise, only returns 0 on error/EOF: use execio_state() to determine + doesn't block, + returns 0 on success, 1 on failure */ -size_t execio_read(struct execio *eio, void *buf, size_t len); -size_t execio_write(struct execio *eio, void *buf, size_t len); +int execio_read(struct execio *eio, void *buf, size_t len, size_t *bytesread); +int execio_write(struct execio *eio, void *buf, size_t len, size_t *bytesread); enum execio_state execio_state(struct execio *eio);