diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 19:33:32 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 19:33:32 +0000 |
commit | 8bb05ac73a5b448b339ce0bc8d396c82c459b47f (patch) | |
tree | 1fdda006866bca20d41cb206767ea5241e36852f /lib/pty-session.c | |
parent | Adding debian version 2.39.3-11. (diff) | |
download | util-linux-8bb05ac73a5b448b339ce0bc8d396c82c459b47f.tar.xz util-linux-8bb05ac73a5b448b339ce0bc8d396c82c459b47f.zip |
Merging upstream version 2.40.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | lib/pty-session.c | 7 |
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); |