From: simon Date: Thu, 8 Dec 2011 19:15:52 +0000 (+0000) Subject: Block SIGPIPE in Unix plink. In a port-forwarding run we may have lots X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/commitdiff_plain/1f39cbd06644899904fdb4b125c9d6e989790a9f?ds=sidebyside Block SIGPIPE in Unix plink. In a port-forwarding run we may have lots of local sockets and pipes all open at once, and if one of them is uncleanly closed from the remote end we don't want the whole application to die - we want to close that socket's SSH channel and continue with the rest of the run. git-svn-id: svn://svn.tartarus.org/sgt/putty@9359 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/unix/uxplink.c b/unix/uxplink.c index 37c8533e..b3e5679d 100644 --- a/unix/uxplink.c +++ b/unix/uxplink.c @@ -886,6 +886,12 @@ int main(int argc, char **argv) conf_set_int(conf, CONF_port, portnumber); /* + * Block SIGPIPE, so that we'll get EPIPE individually on + * particular network connections that go wrong. + */ + putty_signal(SIGPIPE, SIG_IGN); + + /* * Set up the pipe we'll use to tell us about SIGWINCH. */ if (pipe(signalpipe) < 0) {