SafeFork.call

Call the delegate, possibly within a fork. Ensures that the delegate will only be called when there is not already a fork running. The fork exits after the delegate returned.

Note that the host process is not informed about any errors in the forked process.

class SafeFork
bool
call
(
bool block = false
)

Parameters

block bool

if true, wait for a currently running fork and don't fork when calling the delegate if false, don't do anything when a fork is currently running

Return Value

Type: bool

true when the delegate was called

See Also

SafeFork.isRunning

Meta