diff options
author | pommicket <pommicket@gmail.com> | 2022-12-07 20:22:42 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-12-07 20:22:42 -0500 |
commit | 62aea26c345c74ddee40712eb72eb290a1bfd902 (patch) | |
tree | b6451e917533c9fc75f58c053ec87418871ab048 /process.h | |
parent | 65b72b38ec6c3a51b33e5d32313b51df993b32e4 (diff) |
more lsp stuff
Diffstat (limited to 'process.h')
-rw-r--r-- | process.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -8,6 +8,8 @@ typedef struct Process Process; typedef struct { bool stdin_blocking; bool stdout_blocking; + bool separate_stderr; + bool stderr_blocking; // not applicable if separate_stderr is false. } ProcessSettings; // get process ID of this process @@ -31,6 +33,10 @@ long long process_write(Process *process, const char *data, size_t size); // 0 on end of file // or a positive number indicating the number of bytes read to data (at most size) 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. +// if separate_stderr is false, then both stdout and stderr will be sent via process_read. +long long process_read_stderr(Process *process, char *data, size_t size); // Checks if the process has exited. Returns: // -1 if the process returned a non-zero exit code, or got a signal. // 1 if the process exited successfully |