From: Todd C. Miller Date: Fri, 18 Dec 2015 21:41:11 +0000 (-0700) Subject: Clarify when SIGINT and SIGQUIT are relayed by sudo to the command. X-Git-Tag: SUDO_1_8_16^2~88 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=584aebe738084f4bc74bcffa886f8da82010bd30;p=sudo Clarify when SIGINT and SIGQUIT are relayed by sudo to the command. --- diff --git a/doc/sudo.cat b/doc/sudo.cat index 95544a7d3..90b061b8d 100644 --- a/doc/sudo.cat +++ b/doc/sudo.cat @@ -374,12 +374,12 @@ CCOOMMMMAANNDD EEXXEECCUUTTIIOONN SSiiggnnaall hhaannddlliinngg When the command is run as a child of the ssuuddoo process, ssuuddoo will relay - signals it receives to the command. Unless the command is being run in a - new pty, the SIGINT and SIGQUIT signals are not relayed unless they are - sent by a user process, not the kernel. Otherwise, the command would - receive SIGINT twice every time the user entered control-C. Some - signals, such as SIGSTOP and SIGKILL, cannot be caught and thus will not - be relayed to the command. As a general rule, SIGTSTP should be used + signals it receives to the command. The SIGINT and SIGQUIT signals are + only relayed when the command is being run in a new pty or when the + signal was sent by a user process, not the kernel. This prevents the + command from receiving SIGINT twice each time the user enters control-C. + Some signals, such as SIGSTOP and SIGKILL, cannot be caught and thus will + not be relayed to the command. As a general rule, SIGTSTP should be used instead of SIGSTOP when you wish to suspend a command being run by ssuuddoo. As a special case, ssuuddoo will not relay signals that were sent by the diff --git a/doc/sudo.man.in b/doc/sudo.man.in index d55dcc62f..6350b0566 100644 --- a/doc/sudo.man.in +++ b/doc/sudo.man.in @@ -730,15 +730,15 @@ When the command is run as a child of the process, \fBsudo\fR will relay signals it receives to the command. -Unless the command is being run in a new pty, the +The \fRSIGINT\fR and \fRSIGQUIT\fR -signals are not relayed unless they are sent by a user process, -not the kernel. -Otherwise, the command would receive +signals are only relayed when the command is being run in a new pty +or when the signal was sent by a user process, not the kernel. +This prevents the command from receiving \fRSIGINT\fR -twice every time the user entered control-C. +twice each time the user enters control-C. Some signals, such as \fRSIGSTOP\fR and diff --git a/doc/sudo.mdoc.in b/doc/sudo.mdoc.in index 44674875a..f2cb8d9fe 100644 --- a/doc/sudo.mdoc.in +++ b/doc/sudo.mdoc.in @@ -665,15 +665,15 @@ When the command is run as a child of the process, .Nm will relay signals it receives to the command. -Unless the command is being run in a new pty, the +The .Dv SIGINT and .Dv SIGQUIT -signals are not relayed unless they are sent by a user process, -not the kernel. -Otherwise, the command would receive +signals are only relayed when the command is being run in a new pty +or when the signal was sent by a user process, not the kernel. +This prevents the command from receiving .Dv SIGINT -twice every time the user entered control-C. +twice each time the user enters control-C. Some signals, such as .Dv SIGSTOP and