Re: Killed by SIGPIPE using Memcached::libmemcached

2009-01-29 Thread Brian Aker
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

Re: Killed by SIGPIPE using Memcached::libmemcached

2009-01-29 Thread Mikael Johansson
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

Re: Killed by SIGPIPE using Memcached::libmemcached

2009-01-29 Thread Trond Norbye
On Jan 29, 2009, at 6:11 PM, Bill Moseley wrote: Excuse my poor IPC skills, but could the SIGPIPE handler be localized just to the library's socket calls and then restored? I guess there's risk that something else might interrupt before restoring the handler. We could do so, but then we

Re: Killed by SIGPIPE using Memcached::libmemcached

2009-01-29 Thread Trond Norbye
On Jan 29, 2009, at 7:50 PM, Mikael Johansson wrote: 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

Killed by SIGPIPE using Memcached::libmemcached

2008-11-26 Thread Bill Moseley
I'm getting a SIGPIPE when trying to read the cache after I kill a memcached server. I'm using the Perl module Memcached::libmemcached Version 0.2101 (with libmemcached-0.21 embedded). I also installed libmemcached-0.23 before installing the Perl module, but the module is reporting it's using