httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Terbush <>
Subject Re: SIGPIPE and timeout on Solaris
Date Mon, 01 Apr 1996 03:24:49 GMT
> One thing I discovered when playing with my threaded server is that 
> there is a potential for an infinite loop in the timeout() routine in
> http_main.c --- it does not block SIGPIPE, so when it tries to flush
> the connection before closing it, I found at least my threaded version
> getting (the threaded equivalent of) another SIGPIPE, leading to infinite
> recursion.  In the threaded case, with the stack in the data segment,
> this led to a quick core dump, but on other systems it might last quite
> a while.  
> The fix (I think) was to put the moral equivalent of signal (SIGPIPE, SIG_IGN)
> inside the timeout() routine.  At any rate, it may be worth trying.
> rst

Adding 'signal (SIGPIPE, SIG_IGN)' to the top of timeout() seems to
have fixed this. Thanks Rob!

Some others ought to review this before we commit it, but it seems
that it works.

View raw message