Hi,

send() allows you to specify MSG_NOSIGNAL in the flags parameter which will suppress the SIGPIPE signal. The library can detect this error when send() returns -1 and errno is set to EPIPE, and flag the server as down. We use this in pecl/memcache and it seems to work fine.

//Mikael

Brian Aker wrote:

Hi!

On Jan 29, 2009, at 1:48 AM, Trond Norbye wrote:

Personally I don't think the library should install a signal handler, because you as a developer might want to trap SIGPIPE

We have been asking ourselves this question, aka "Should we optionally add one?". I would love to get some more feedback on this.

Cheers,
    -Brian

--
_______________________________________________________
Brian "Krow" Aker, brian at tangent.org
Seattle, Washington
http://krow.net/                     <-- Me
http://tangent.org/                <-- Software
_______________________________________________________
You can't grep a dead tree.




Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to