Re: [zeromq-dev] [patch] handle SIGPIPE

2010-07-07 Thread Brian Bloniarz
On 07/07/2010 03:55 AM, Steven McCoy wrote: > On 7 July 2010 15:03, Martin Lucina > wrote: > > I don't have the code handy right now, look for the call to > pthread_sigmask(). The signal mask is cleared for all 0MQ I/O threads, > so they will not get any signal

Re: [zeromq-dev] [patch] handle SIGPIPE

2010-07-07 Thread Dhammika Pathirana
> > I don't have the code handy right now, look for the call to > pthread_sigmask(). The signal mask is cleared for all 0MQ I/O threads, > so they will not get any signals (excepting SIGSEGV, etc.) > > Hence the SIGPIPE issue should be moot, unless on some broken OS a > SIGPIPE correctly ignore

Re: [zeromq-dev] [patch] handle SIGPIPE

2010-07-07 Thread Steven McCoy
On 7 July 2010 15:03, Martin Lucina wrote: > I don't have the code handy right now, look for the call to > pthread_sigmask(). The signal mask is cleared for all 0MQ I/O threads, > so they will not get any signals (excepting SIGSEGV, etc.) > > #if !defined ZMQ_HAVE_OPENVMS // Following code

Re: [zeromq-dev] [patch] handle SIGPIPE

2010-07-07 Thread Martin Lucina
On 7/7/2010, "Steven McCoy" wrote: >On 7 July 2010 11:29, Dhammika Pathirana wrote: > >> How does 0MQ ignore signals? I don't see a signal handler or SIG_IGN flag. >> Default SIGPIPE behavior is to terminate the process.ore >> >> >It ignores them by not handling them at all. The application de

Re: [zeromq-dev] [patch] handle SIGPIPE

2010-07-06 Thread Steven McCoy
On 7 July 2010 11:29, Dhammika Pathirana wrote: > How does 0MQ ignore signals? I don't see a signal handler or SIG_IGN flag. > Default SIGPIPE behavior is to terminate the process.ore > > It ignores them by not handling them at all. The application developer needs to manage them. At a guess. -

Re: [zeromq-dev] [patch] handle SIGPIPE

2010-07-06 Thread Dhammika Pathirana
On 7/6/10, Martin Lucina wrote: > dhamm...@gmail.com said: > > Patch to handle SIGPIPE in send(). > > SIGPIPE behavior is not consistent even across *ix platforms. Linux > > has MSG_NOSIGNAL and Mac supports SO_NOSIGPIPE. Best option is to set > > SIG_IGN, but it's more of an application setti

Re: [zeromq-dev] [patch] handle SIGPIPE

2010-07-06 Thread Martin Lucina
dhamm...@gmail.com said: > Patch to handle SIGPIPE in send(). > SIGPIPE behavior is not consistent even across *ix platforms. Linux > has MSG_NOSIGNAL and Mac supports SO_NOSIGPIPE. Best option is to set > SIG_IGN, but it's more of an application setting. We should document > this. Why would we ne

Re: [zeromq-dev] [patch] handle SIGPIPE

2010-07-06 Thread Dhammika Pathirana
Sure, all my posts are submitted under MIT license. On 7/6/10, Pieter Hintjens wrote: > > > Dhammika, > > Thanks for the patch. We'll apply it asap. Please confirm you submit it > under MIT license... thanks. > > -Pieter > > Sent from my Android mobile phone. > > > On Jul 6, 2010 8:01 AM, "Dhamm

Re: [zeromq-dev] [patch] handle SIGPIPE

2010-07-06 Thread Pieter Hintjens
Dhammika, Thanks for the patch. We'll apply it asap. Please confirm you submit it under MIT license... thanks. -Pieter Sent from my Android mobile phone. On Jul 6, 2010 8:01 AM, "Dhammika Pathirana" wrote: Patch to handle SIGPIPE in send(). SIGPIPE behavior is not consistent even across *ix p

[zeromq-dev] [patch] handle SIGPIPE

2010-07-05 Thread Dhammika Pathirana
Patch to handle SIGPIPE in send(). SIGPIPE behavior is not consistent even across *ix platforms. Linux has MSG_NOSIGNAL and Mac supports SO_NOSIGPIPE. Best option is to set SIG_IGN, but it's more of an application setting. We should document this. diff --git a/src/tcp_connecter.cpp b/src/tcp_connec