From 0986371b94ede55e7b15935095bf7c60c15b50c7 Mon Sep 17 00:00:00 2001 From: Daniel Nichter Date: Sun, 23 Jun 2024 15:18:04 -0400 Subject: [PATCH] Add note about SIGINT (re issue #100) --- cmd.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd.go b/cmd.go index 3a696b1..dd98236 100644 --- a/cmd.go +++ b/cmd.go @@ -120,6 +120,11 @@ var ( // but was terminated unexpectedly (probably signaled). In either case, the // command failed. Callers should check Error first. If nil, then check Exit and // Complete. +// +// Note that SIGINT (interrupt) does not terminate a program. If caught and the +// program exits, Error will be nil and Complete will be true because the program +// completed as expectedly by its signal handler. See "Signals (Bash Reference Manual)": +// https://www.gnu.org/software/bash/manual/html_node/Signals.html type Status struct { Cmd string PID int