Documentation
¶
Overview ¶
Stopping a git whose context ends: asked to stop first, so it removes the lock files it holds, and killed only if it hasn't stopped within StopGrace.
Index ¶
Constants ¶
const StopGrace = 10 * time.Second
StopGrace is how long a git asked to stop has to remove its lock files and exit before it is killed.
Variables ¶
This section is empty.
Functions ¶
func Environment ¶
func StartTiming ¶
func StopOnCancel ¶ added in v0.1.100
StopOnCancel makes cmd, made with exec.CommandContext, ask git to stop when its context ends rather than kill it: a killed git leaves its lock files behind, and every later git that needs them fails until they are removed. Git still running StopGrace after it was asked is killed.