SIGPIPE signal - interaction with other libraries

From: Jon Herlocker (herlocke@cs.umn.edu)
Date: Sat Dec 18 1999 - 06:44:30 EST


Hi all,

I'm calling msql from Apache (using mod_perl). I'm having some "issues"
with the server that appear to be related to the SIGPIPE signal.

From my rough analysis of the code and the running process, it seems
that the msql client library sets a handler for the sigpipe signal, but
doesn't reset the handler when it returns control to the calling
process. The result is that any previously existing handler for sigpipe
(in this case apache), is lost. Also, msql may now get sigpipes intended
for Apache, and apache may not be able to clean up its connections
properly.

It looks like this might have been done once, as the pre-existing
handler is saved in the 'oldHandler' variable of libmsql.c, but then
that variable is never accessed.

Has anybody else seen similar problems with Apache or any other system?

Does anybody have suggestions for solutions? I'm considering just
commenting out the signal() call in libmsql.c. Since the signal is being
caught by Apache, we don't have to worry about the process being
terminated, and msql seems to check the return value of write().

Thanks,
Jon
-------------------------------------------------------------------------
To unsubscribe, go to http://www.Hughes.com.au/extras/email/



This archive was generated by hypermail 2b30 : Mon Mar 04 2002 - 09:04:03 EST