Documentation
¶
Overview ¶
Package procx starts the project's commands (restore, prepare, guards, command steps, token commands, bisect hooks) so that a time limit or an interrupt stops all of what they started, not only the command itself: a command runs in a process group of its own, and the whole group is killed when its context ends. Without that, a child that keeps the command's output open (the server `make restart` starts, a shell's job) keeps the wait going past any time limit, and outlives it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var WaitDelay = 5 * time.Second
WaitDelay is how long a command's output is still read after it ended or its context did: a child it left behind may hold the output open.
Functions ¶
func Command ¶
Command is exec.CommandContext for a command of the project, in a process group of its own that is killed when ctx ends. Run it with Run or Output.
func KillAll ¶
func KillAll()
KillAll kills every command still running, with what it started: for a process that is about to end at once (a second Ctrl-C), whose commands would otherwise run on, outside the terminal's reach.
Types ¶
This section is empty.