NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ECONNRESET not returned when calling send() on a socket



On Mon, 23 Dec 2019 14:31:19 +0300
Valery Ushakov <uwe%stderr.spb.ru@localhost> wrote:

> On Mon, Dec 23, 2019 at 11:22:41 +0000, Sad Clouds wrote:
> 
> > I handle SIGPIPE now, but don't see the value of having both SIGPIPE
> > and ECONNRESET for a socket. The behaviour is rather inconsistent,
> > i.e. you call send() and sometimes you get a SIGPIPE signal and
> > sometimes you don't. Maybe it's just a Linux issue and NetBSD always
> > sends SIGPIPE.
> 
> Why do you keep inflicting this on yourself?  Just disable SIGPIPE
> delivery for your sockets.  That's the way it's meant to be used.  
> 
> -uwe

Because there is no portable way of disabling SIGPIPE, but looks like
there is no way around it, so that is what I've been doing with #ifdef
macros. 


Home | Main Index | Thread Index | Old Index