Reset caught variable when signal is handled by su.
* src/su.c: When a SIGTSTP is caught, reset caught to 0. There is no need to kill the child in such case after su is resumed. This remove the "Session terminated, terminating shell... ...terminated." messages in such case.
This commit is contained in:
parent
29bd7e1929
commit
a5e3dbb0e3
@ -1,3 +1,10 @@
|
|||||||
|
2013-08-13 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
|
* src/su.c: When a SIGTSTP is caught, reset caught to 0. There is
|
||||||
|
no need to kill the child in such case after su is resumed. This
|
||||||
|
remove the "Session terminated, terminating shell...
|
||||||
|
...terminated." messages in such case.
|
||||||
|
|
||||||
2013-08-13 Nicolas François <nicolas.francois@centraliens.net>
|
2013-08-13 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
* man/newgidmap.1.xml: Document the checks performed before
|
* man/newgidmap.1.xml: Document the checks performed before
|
||||||
|
1
src/su.c
1
src/su.c
@ -347,6 +347,7 @@ static void prepare_pam_close_session (void)
|
|||||||
if ( ((pid_t)-1 == pid)
|
if ( ((pid_t)-1 == pid)
|
||||||
&& (EINTR == errno)
|
&& (EINTR == errno)
|
||||||
&& (SIGTSTP == caught)) {
|
&& (SIGTSTP == caught)) {
|
||||||
|
caught = 0;
|
||||||
/* Except for SIGTSTP, which request to
|
/* Except for SIGTSTP, which request to
|
||||||
* stop the child.
|
* stop the child.
|
||||||
* We will SIGSTOP ourself on the next
|
* We will SIGSTOP ourself on the next
|
||||||
|
Loading…
Reference in New Issue
Block a user