comparison svr-chansession.c @ 955:36eacc322e00

Make sure the check_close() handler runs when a server child process exits
author Matt Johnston <matt@ucc.asn.au>
date Mon, 28 Jul 2014 23:23:49 +0800
parents 5daedffd0769
children 0bb16232e7c4
comparison
equal deleted inserted replaced
953:356a25a108a3 955:36eacc322e00
87 struct sigaction sa_chld; 87 struct sigaction sa_chld;
88 struct exitinfo *exit = NULL; 88 struct exitinfo *exit = NULL;
89 89
90 const int saved_errno = errno; 90 const int saved_errno = errno;
91 91
92 /* Make channel handling code look for closed channels */
93 ses.channel_signal_pending = 1;
94
92 TRACE(("enter sigchld handler")) 95 TRACE(("enter sigchld handler"))
93 while ((pid = waitpid(-1, &status, WNOHANG)) > 0) { 96 while ((pid = waitpid(-1, &status, WNOHANG)) > 0) {
94 TRACE(("sigchld handler: pid %d", pid)) 97 TRACE(("sigchld handler: pid %d", pid))
95 98
96 exit = NULL; 99 exit = NULL;