Documentation ¶
Overview ¶
proc extends the standard exec package to deal with processes in a more graceful way.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GracefulCommandContext ¶
GracefulCommandContext has the same purpose as exec.CommandContext, but the cancellation is done gracefully, and the process descendants are killed as well.
func Kill ¶
Kill kills a process by pid.
Be careful: exec.Process.Kill() (which eventually is what is called by exec.CommandContext) does not gracefully kill the process, and does not kill the child processes. Killing child processes can be done programmatically, but it's an involved task (see, e.g., https://groups.google.com/forum/#!topic/golang-nuts/nayHpf8dVxI).
Therefore, we call the native executables to do the heavy lifting for us.
Types ¶
This section is empty.