proc

package
v0.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
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

func Command(name string, args ...string) *exec.Cmd

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.

func Start

func Start(cmd *exec.Cmd) error

Start starts cmd and tracks it until Wait.

func Wait

func Wait(cmd *exec.Cmd) error

Wait waits for cmd and stops tracking it. After cancellation it reports context.Canceled rather than the tool's own failure.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL