Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Feb 1997 18:49:04 +0100 (MEZ)
From:      "Hr.Ladavac" <lada@ws2301.gud.siemens.co.at>
To:        ljo@mcs.net (Lars Jonas Olsson)
Cc:        hackers@freebsd.org, ljo@mcs.net
Subject:   Re: sigwait and threads?
Message-ID:  <199702051749.AA254324944@ws2301.gud.siemens.co.at>
In-Reply-To: <199702051620.KAA25043@Mars.mcs.net> from "Lars Jonas Olsson" at Feb 5, 97 10:20:35 am

next in thread | previous in thread | raw e-mail | index | archive | help
E-mail message from Lars Jonas Olsson contained:
> 
>  The "Threads primer" book by Lewis and Berg recommends using sigwait
> for signal handling in multi-threaded applications. FreeBSD doesn't
> have a sigwait though. Should we get one? Or is another method for
> signal handling recommended?
> 
>  I've got a multi-threaded application that currently runs on SCO
> UnixWare 2.1 that I also want to be able to run on FreeBSD. This
> application uses sigwait and no signal handlers.

sigwait() is a DCE-ism, or better yet, pthread Draft 4-ism.  At that
stage they had no support for per thread sigaction() nor signal()--as a
matter of fact, one was not allowed to use them.

Pthread Draft 7 introduced per-thread sigaction and signal semantics, and
I believe the Draft 10 and Standard have thrown the whole sigwait mess out.

AFAIK, the libc_r implements pthread Standard; you should be able to 
use sigaction instead.  It might be possible to write a wrapper around
it to implement sigwait for the DCE compatibility.  Andy(?) Birrell may
have further comments.

Another difference that DCE requires and Draft 8 has thrown out is 
pthread_detach().

/Marino
> 
> Jonas
> 




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