You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Randy Terbush <ra...@zyzzyva.com> on 1996/04/01 05:24:49 UTC
Re: SIGPIPE and timeout on Solaris
> 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.