Add read_pipe_all()

Add a convenience function to read from a pipe until all requested data
has been read.
This commit is contained in:
Romain Vimont
2021-10-17 16:20:46 +02:00
parent 96b18dabaa
commit 0681480809
2 changed files with 18 additions and 0 deletions

View File

@@ -96,6 +96,9 @@ is_regular_file(const char *path);
ssize_t
read_pipe(pipe_t pipe, char *data, size_t len);
ssize_t
read_pipe_all(pipe_t pipe, char *data, size_t len);
void
close_pipe(pipe_t pipe);