cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Re: SIGPIPE

From: Giuseppe Attardi <attardi_at_di.unipi.it>
Date: Wed, 3 Dec 2003 10:15:15 +0100

> From: Daniel Stenberg <daniel-curl_at_haxx.se>
> To: libcurl Mailing list <curl-library_at_lists.sourceforge.net>
> Subject: Re: Re: SIGPIPE
> Reply-To: curl-library_at_lists.sourceforge.net
>
> On Tue, 2 Dec 2003, Giuseppe Attardi wrote:
>
> > Wouldn't be enough just to add to setup.h:
> >
> > #ifndef MSG_NOSIGNAL
> > #define MSG_NOSIGNAL 0
> > #endif
> >
> > and then use
> >
> > #define sread(x,y,z) recv(x,y,z,MSG_NOSIGNAL)
>
> Hehe, yes that would be significantly easier.
>
> However, it would make an uglier check when we use that HAVE_MSG_NOSIGNAL
> symbol to decide weather to include the SIGPIPE ignore code or not.
>
> But then, I could make an #else and define the HAVE_MSG_NOSIGNAL there...
>

Right, or you could use

#if defined(HAVE_SIGNAL) && defined(SIGPIPE) && (MSG_NOSIGNAL != 0)

-- Beppe

-------------------------------------------------------
This SF.net email is sponsored by OSDN's Audience Survey.
Help shape OSDN's sites and tell us what you think. Take this
five minute survey and you could win a $250 Gift Certificate.
http://www.wrgsurveys.com/2003/osdntech03.php?site=8
Received on 2003-12-03