Documentation
¶
Overview ¶
Package proc starts external tools so that cancelling volt (Ctrl-C, or the IDE killing it with SIGTERM) also stops everything they spawned: idf.py, install.sh and git leave grandchildren (ninja, gcc, pip) that would otherwise keep running and holding the build dir or serial port.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
// Root is cancelled on SIGINT/SIGTERM. Long-running work that is not an
// external process (the serial monitor) watches it to shut down cleanly.
Root, _ = context.WithCancel(context.Background())
)
Functions ¶
func Command ¶
Command is exec.Command for a tool that may spawn its own children. Start and Wait it with Start/Wait below so cancellation can reach it.
func HandleSignals ¶
func HandleSignals()
HandleSignals makes SIGINT/SIGTERM cancel Root and terminate every running command's process group, then exits 130 if main has not returned by then.
Types ¶
This section is empty.