From be318b18a01481d16149c34f649c9cdb1f91979d Mon Sep 17 00:00:00 2001 From: pommicket Date: Thu, 5 Jan 2023 11:52:57 -0500 Subject: clean up some TODOs --- os.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'os.h') diff --git a/os.h b/os.h index fd4bf8e..b7d189e 100644 --- a/os.h +++ b/os.h @@ -104,6 +104,7 @@ const char *process_geterr(Process *process); // returns: // -2 on error // or a non-negative number indicating the number of bytes written. +// If stdin is set to blocking, fewer than `size` bytes will be written only if an error occured. long long process_write(Process *process, const char *data, size_t size); // read from stdout+stderr // returns: @@ -111,6 +112,7 @@ long long process_write(Process *process, const char *data, size_t size); // -1 if no data is available right now // 0 on end of file // or a positive number indicating the number of bytes read to data (at most size) +// If stdout is set to blocking, fewer than `size` bytes will be read only if an error occured or end-of-file was reached. long long process_read(Process *process, char *data, size_t size); // like process_read, but reads stderr. // this function ALWAYS RETURNS -2 if separate_stderr is not specified in the ProcessSettings. -- cgit v1.2.3