This is the mail archive of the
mailing list for the glibc project.
Re: [libc-alpha] mt-application hanging in exit()
- From: Bertold Kolics <Bertold dot Kolics at Sun dot COM>
- To: Kaz Kylheku <kaz at ashi dot footprints dot net>
- Cc: Andreas Jaeger <aj at suse dot de>, libc-alpha at sources dot redhat dot com
- Date: Tue, 22 Jan 2002 12:29:59 -0600
- Subject: Re: [libc-alpha] mt-application hanging in exit()
- Organization: Sun Microsystems, Inc.
- References: <Pine.LNX.4.33.0201191147590.24981-100000@ashi.FootPrints.net>
- Reply-to: Bertold dot Kolics at Sun dot COM
Kaz Kylheku wrote:
> On Sat, 19 Jan 2002, Bertold Kolics wrote:
> > I may have found the problem, but I still believe that there is a problem in glibc.
> Nope, false alarm! Phew!
> > Before setting up the signal handlers, I used to clear the signal mask of the process.
> You should be aware that sigprocmask is restricted to use in a
> single-threaded process. From Draft 7 POSIX, (June 14, 2001):
> The use of the sigprocmask() function is unspecified
> in a multi-threaded process.
> Everyone who cares about writing code that can be compiled and linked
> with a MT application should use pthread_sigmask. It will do the
> same job as sigprocmask in a single-threaded process.
Just one more comment on this (and that is why I think it should be clearly
indicated in the documentation of glibc that use of pthread_sigmask is
mandatory on Linux): UNIX International compliant systems make sigprocmask()
equivalent to pthread_sigmask(). glibc works differently - that's OK, but this
needs to be documented.
Once again, thanks to all who looked into this problem.