Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Aug 2001 08:52:20 -0400 (EDT)
From:      Daniel Eischen <eischen@vigrid.com>
To:        Michael Robinson <robinson@netrinsics.com>
Cc:        current@FreeBSD.ORG, hackers@FreeBSD.ORG
Subject:   Re: _sigprocmask in malloc.c causes full file table?
Message-ID:  <Pine.SUN.3.91.1010812083915.15273A-100000@pcnet1.pcnet.com>
In-Reply-To: <20010812152655.A1569@elephant.netrinsics.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 12 Aug 2001, Michael Robinson wrote:
> Julian Elischer <julian@elischer.org> wrote:
> >Malloc is not re-entrant...i.e.
> >you cannot use in in a signal handler..
> 
> Thank you for that very helpful bit of information, but I already knew that.
> 
> What I do not know is how it is possible for a null _sigprocmask call
> (a SIG_BLOCK call with no mask bits set) in libc/stdlib/malloc.c to cause a
> kernel error, "file: table is full", in libc_r/uthread/uthread_init.c.

This is the first time that I saw libc_r was involved.  Actually, POSIX 
(1003.1, 1996) says this about sigprocmask:

  "The use of the sigprocmask() function is unspecified in a
   multithreaded process."

FreeBSD behaviour of sigprocmask() is the same as Solaris.  sigprocmask()
changes the mask of the calling thread, not the process.  In other words,
it is identical to pthread_sigmask().

If it is being used to block signals for threads other than the calling
thread, it won't work.

-- 
Dan Eischen

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.91.1010812083915.15273A-100000>