Skip to content

process join

Alairion edited this page May 8, 2021 · 5 revisions

Functions

(1) void join();
  1. Blocks the calling thread until the process ends. The process must be joinable. Once joined, joinable() returns false, and return_code() returns the value of the process's return code.

Parameters

None.

Return value

  1. None.

Preconditions

  1. joinable() returns true.

Postconditions

  1. joinable() returns false.

Exceptions

  1. Throws a std::runtime_error if the process can not be joined or its return code can not be obtained.

Implementation details

  1. On Windows, calls WaitForSingleObject and then GetExitCodeProcess
    On Posix systems, calls waitpid
Clone this wiki locally