Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsSupported ¶
func IsSupported() bool
IsSupported returns true if child process reaping is supported on this platform.
func ReapChildren ¶
ReapChildren is a long-running routine that blocks waiting for child processes to exit and reaps them, reporting reaped process IDs to the optional pids channel and any errors to the optional errors channel.
The optional reapLock will be used to prevent reaping during periods when you know your application is waiting for subprocesses to return. You need to use care in order to prevent the reaper from stealing your return values from uses of packages like Go's exec. We use an RWMutex so that we don't serialize all of the application's execution of sub processes with each other, but we do serialize them with reaping. The application should get a read lock when it wants to do a wait.