@@ -195,8 +195,15 @@ * This method needs to be called for some programs before data can be read, * since some programs don't start processing before the write direction is * closed. */ - (void)closeForWriting; + +/*! + * @brief Waits for the process to terminate and returns the exit status. + * + * If the process has already exited, this returns the exit status immediately. + */ +- (int)waitForTermination; @end OF_ASSUME_NONNULL_END