Function rcutils_process_wait

Function Documentation

rcutils_ret_t rcutils_process_wait(const rcutils_process_t *process, int *status)

Blocks until the given subprocess has been has exited.

Wait for a subprocess to terminate, and optionally retrieve the exit code from that process. Upon successful invocation of this function, subsequent calls will produce undefined behavior. It should typically be followed by a call to rcutils_process_close().

Parameters:
  • process[in] The process to wait for

  • status[out] The exit code from that process

Returns:

RCUTILS_RET_OK if the process exited, or

Returns:

RCUTILS_RET_INVALID_ARGUMENT if the process argument is invalid

Returns:

RCUTILS_RET_ERROR if an unexpected error occurs.