Received: by taz.hyperreal.com (8.6.12/8.6.5) id TAA26730; Sun, 31 Mar 1996 19:24:58 -0800 Received: from sierra.zyzzyva.com by taz.hyperreal.com (8.6.12/8.6.5) with ESMTP id TAA26719; Sun, 31 Mar 1996 19:24:53 -0800 Received: from zyzzyva.com (randy@localhost [127.0.0.1]) by sierra.zyzzyva.com (8.7.4/8.6.11) with ESMTP id VAA12431 for ; Sun, 31 Mar 1996 21:24:50 -0600 (CST) Message-Id: <199604010324.VAA12431@sierra.zyzzyva.com> To: new-httpd@hyperreal.com Subject: Re: SIGPIPE and timeout on Solaris In-reply-to: rst's message of Sun, 31 Mar 1996 13:01:37 -0500. <199603311801.NAA05686@volterra.ai.mit.edu> X-uri: http://www.zyzzyva.com/ Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 31 Mar 1996 21:24:49 -0600 From: Randy Terbush Sender: owner-new-httpd@apache.org Precedence: bulk Reply-To: new-httpd@hyperreal.com > 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.