carb::launcher::fWaitFlagCloseStdErrStream

Defined in carb/launcher/ILauncher.h

constexpr WaitFlags carb::launcher::fWaitFlagCloseStdErrStream = 0x00000008

Flag to indicate that the stderr stream for a child should be closed before waiting on it.

Note that doing so will truncate any remaining incoming data on the stream. This is useful for closing the stream and exiting the reader thread when the parent process is no longer interested in the output of the child process (ie: the parent only wanted to wait on a successful startup signal from the child). This flag has no effect if no read callback was provided for the stderr stream when the child process was launched.

Note

[Linux] If this is used on a child process to close the parent process’s end of the stderr stream, the child process will be terminated with SIGPIPE if it ever tries to write to stderr again. This is the default handling of writing to a broken pipe or socket on Linux. The only way around this default behavior is to ensure that the child process ignores SIGPIPE signals. Alternatively, the parent could just wait for the child process to exit before destroying its process handle or closing the stream.