Skip to content

process active

Alairion edited this page May 8, 2021 · 4 revisions

nes::process::active

Functions

(1) bool active() const;
  1. Checks if the process is still running. The process must be joinable.

Parameters

None.

Return value

  1. Returns true if the process is still running.

Preconditions

  1. joinable() returns true.

Complexity

  1. Constant.

Exceptions

  1. May throw a std::runtime_error if the state of the process can not be obtained.

Implementation details

  1. On Windows, returns WaitForSingleObject(handle, 0) == WAIT_TIMEOUT
    On Posix systems, returns kill(handle, 0) != ESRCH
Clone this wiki locally