From owner-freebsd-smp Wed Jan 24 1:35:35 2001 Delivered-To: freebsd-smp@freebsd.org Received: from magnesium.net (toxic.magnesium.net [207.154.84.15]) by hub.freebsd.org (Postfix) with SMTP id 179F737B400 for ; Wed, 24 Jan 2001 01:35:19 -0800 (PST) Received: (qmail 50486 invoked by uid 1142); 24 Jan 2001 09:35:18 -0000 Date: 24 Jan 2001 01:35:18 -0800 Date: Wed, 24 Jan 2001 01:35:07 -0800 From: Jason Evans To: ema@west.se Cc: freebsd-smp@FreeBSD.ORG Subject: Re: Bug (?) with sockets/pthreads/freebsd4.2-stable Message-ID: <20010124013507.K69199@canonware.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from erikmattsson@home.se on Wed, Jan 24, 2001 at 10:16:30AM +0100 Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Wed, Jan 24, 2001 at 10:16:30AM +0100, Erik Mattsson wrote: > Im having problem using threads and sockets on a freebsd smp box. > > Ive mailed freebsd-questions without any reply, and I wonder > if this is a bug in freebsd/smp/pthreads ? > (I was told on a newsgroup that this behaviour might be a bug in the OS) > > The thing is that I've executed the signal(SIGPIPE, SIG_IGN) but > still get SIGPIPE's thrown at the program. This shouldnt be possible > should it ? Here's a snippet of code from a library I wrote that does precisely what you're doing: /* * Ignore SIGPIPE, so that writing to a closed socket * won't crash the program. */ signal(SIGPIPE, SIG_IGN); This code is executed by the initial thread. It works for me... Jason To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message