Skip to content

process kill

Alairion edited this page May 8, 2021 · 2 revisions

Functions

(1) bool kill();
  1. Try to kill the process. If the process is successfully killed, it is joined and its return code become available.

Parameters

None.

Return value

  1. Returns true if the process was successfully killed, false otherwise.

Preconditions

  1. joinable() returns true.

Postconditions

  1. joinable() returns false.

Exceptions

  1. May throw a std::runtime_error if the process's return code can not be obtained.

Implementation details

  1. On Windows, calls TerminateProcess
    On Posix systems, calls kill to send a SIGTERM to the process
Clone this wiki locally