Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Jan 2001 01:35:07 -0800
From:      Jason Evans <jasone@canonware.com>
To:        ema@west.se
Cc:        freebsd-smp@FreeBSD.ORG
Subject:   Re: Bug (?) with sockets/pthreads/freebsd4.2-stable
Message-ID:  <20010124013507.K69199@canonware.com>
In-Reply-To: <Pine.LNX.4.30.0101241005590.2767-100000@grumpy.west.se>; from erikmattsson@home.se on Wed, Jan 24, 2001 at 10:16:30AM %2B0100
References:  <Pine.LNX.4.30.0101241005590.2767-100000@grumpy.west.se>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010124013507.K69199>