summaryrefslogtreecommitdiffstats
path: root/lib/pty-session.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:33:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:33:34 +0000
commit1272be04be0cb803eec87f602edb2e3e6f111aea (patch)
treebce17f6478cdd9f3c4ec3d751135dc42786d6a56 /lib/pty-session.c
parentReleasing progress-linux version 2.39.3-11~progress7.99u1. (diff)
downloadutil-linux-1272be04be0cb803eec87f602edb2e3e6f111aea.tar.xz
util-linux-1272be04be0cb803eec87f602edb2e3e6f111aea.zip
Merging upstream version 2.40.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/pty-session.c')
-rw-r--r--lib/pty-session.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/pty-session.c b/lib/pty-session.c
index 3849065..815264d 100644
--- a/lib/pty-session.c
+++ b/lib/pty-session.c
@@ -241,6 +241,7 @@ int ul_pty_signals_setup(struct ul_pty *pty)
sigaddset(&ourset, SIGCHLD);
sigaddset(&ourset, SIGWINCH);
sigaddset(&ourset, SIGALRM);
+ sigaddset(&ourset, SIGHUP);
sigaddset(&ourset, SIGTERM);
sigaddset(&ourset, SIGINT);
sigaddset(&ourset, SIGQUIT);
@@ -584,6 +585,8 @@ static int handle_signal(struct ul_pty *pty, int fd)
&info, (void *) &pty->win);
}
break;
+ case SIGHUP:
+ /* fallthrough */
case SIGTERM:
/* fallthrough */
case SIGINT:
@@ -641,7 +644,7 @@ int ul_pty_proxy_master(struct ul_pty *pty)
/* note, callback usually updates @next_callback_time */
if (timerisset(&pty->next_callback_time)) {
- struct timeval now;
+ struct timeval now = { 0 };;
DBG(IO, ul_debugobj(pty, " callback requested"));
gettime_monotonic(&now);
@@ -654,7 +657,7 @@ int ul_pty_proxy_master(struct ul_pty *pty)
/* set timeout */
if (timerisset(&pty->next_callback_time)) {
- struct timeval now, rest;
+ struct timeval now = { 0 }, rest = { 0 };
gettime_monotonic(&now);
timersub(&pty->next_callback_time, &now, &rest);