summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas François <nicolas.francois@centraliens.net>2013-08-13 19:42:50 +0200
committerNicolas François <nicolas.francois@centraliens.net>2013-08-13 19:42:50 +0200
commita5e3dbb0e36444b915bc9c4c295a5e1a84d3918e (patch)
treee2516bec35ff1722d7539338887e87dedae4195a
parent29bd7e1929b439f8cb3ec353be03aedc91c6f0c6 (diff)
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.
-rw-r--r--ChangeLog7
-rw-r--r--src/su.c1
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c966957d..4d40562a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
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>
+
* man/newgidmap.1.xml: Document the checks performed before
setting the mapping in /proc.
* man/newuidmap.1.xml: Likewise.
diff --git a/src/su.c b/src/su.c
index 98ea6de3..43f7dc4b 100644
--- a/src/su.c
+++ b/src/su.c
@@ -347,6 +347,7 @@ static void prepare_pam_close_session (void)
if ( ((pid_t)-1 == pid)
&& (EINTR == errno)
&& (SIGTSTP == caught)) {
+ caught = 0;
/* Except for SIGTSTP, which request to
* stop the child.
* We will SIGSTOP ourself on the next