From c61e14d3a8412cd50d98aab604e607692c844c8a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 21:33:30 +0200 Subject: Adding upstream version 2.40. Signed-off-by: Daniel Baumann --- lib/pty-session.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/pty-session.c') 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); -- cgit v1.2.3