From owner-freebsd-questions Sun Mar 23 17:32: 2 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 68A3B37B401 for ; Sun, 23 Mar 2003 17:32:01 -0800 (PST) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC7F643F75 for ; Sun, 23 Mar 2003 17:32:00 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.7/8.12.7) id h2O1W0OV075451; Sun, 23 Mar 2003 19:32:00 -0600 (CST) (envelope-from dan) Date: Sun, 23 Mar 2003 19:32:00 -0600 From: Dan Nelson To: Dave Hayes Cc: freebsd-questions@FreeBSD.ORG Subject: Re: SIGPIPE and threaded servers Message-ID: <20030324013200.GK63147@dan.emsphone.com> References: <200303240122.h2O1MHuq046776@hokkshideh2.jetcafe.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200303240122.h2O1MHuq046776@hokkshideh2.jetcafe.org> X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.4i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In the last episode (Mar 23), Dave Hayes said: > I have a relatively simple threaded TCP server that services high > volumes of requests. Currently it appears to randomly crash receiving > a SIGPIPE. > > Attempts to ignore SIGPIPE via the sigaction() semantic only prevent > me from sending the signal with "kill" to test whether or not SIGPIPE > is actually ignored. =/ Then it's being ignored and your job is done :) > What is going on here? From the signal manpage: Name Default Action Description ---- -------------- ----------- SIGPIPE terminate process write on a pipe with no reader It's doing just what it is supposed to. -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message