terminating: Terminating a Child Process.

Description Usage Arguments Format Details Value See Also

Description

These functions give access to the state of the child process and to its exit status (return code).

The timeout parameter can take one of three values:

TIMEOUT_INFINITE denotes an "infinite" timeout (that is, wait until response is available) when waiting for an operation to complete.

TIMEOUT_IMMEDIATE denotes an "immediate" timeout (in other words, no timeout) when waiting for an operation to complete.

Usage

1
2
3
4
5
6
7
8
9

Arguments

handle

Process handle obtained from spawn_process.

timeout

Optional timeout in milliseconds.

Format

An object of class integer of length 1.

Details

process_wait() checks the state of the child process by invoking the system call waitpid() or WaitForSingleObject().

process_state() refreshes the handle by calling process_wait() with no timeout and returns one of these values: "not-started". "running", "exited", "terminated".

process_return_code() gives access to the value returned also by process_wait(). It does not invoke process_wait() behind the scenes.

Value

process_wait() returns an integer exit code of the child process or NA if the child process has not exited yet. The same value can be accessed by process_return_code().

See Also

spawn_process, process_read signals


subprocess documentation built on May 29, 2017, 11:02 a.m.