Mercurial > dropbear
comparison common-channel.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 | 2e402a09e21e |
children | 0bb16232e7c4 |
comparison
equal
deleted
inserted
replaced
953:356a25a108a3 | 955:36eacc322e00 |
---|---|
256 if (ERRFD_IS_WRITE(channel) | 256 if (ERRFD_IS_WRITE(channel) |
257 && channel->errfd >= 0 && FD_ISSET(channel->errfd, writefds)) { | 257 && channel->errfd >= 0 && FD_ISSET(channel->errfd, writefds)) { |
258 writechannel(channel, channel->errfd, channel->extrabuf); | 258 writechannel(channel, channel->errfd, channel->extrabuf); |
259 do_check_close = 1; | 259 do_check_close = 1; |
260 } | 260 } |
261 | |
262 if (ses.channel_signal_pending) { | |
263 /* SIGCHLD can change channel state for server sessions */ | |
264 do_check_close = 1; | |
265 ses.channel_signal_pending = 0; | |
266 } | |
261 | 267 |
262 /* handle any channel closing etc */ | 268 /* handle any channel closing etc */ |
263 if (do_check_close) { | 269 if (do_check_close) { |
264 check_close(channel); | 270 check_close(channel); |
265 } | 271 } |