From: Ulrich Drepper <drepper@redhat.com>
To: Jamie Lokier <jamie@shareable.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>
Subject: Re: Question about threads and signals
Date: Sat, 18 Jan 2003 03:51:02 +0000 [thread overview]
Message-ID: <3E28CF26.6020202@redhat.com> (raw)
In-Reply-To: <20030118032450.GA18282@bjl1.asuk.net>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jamie Lokier wrote:
> 1. If a signal is delivered to a thread, is it masked for the duration of
> the handler in (a) just that thread or (b) all threads?
(a)
> In other words, if I have 3 threads and SIGIO is not blocked in any
> of them, is it possible for my SIGIO handler to be called up to 3
> times concurrently? Or is the blocked mask somehow shared?
Masks are never shared.
> Is the same thing true of SIGCHLD? SIGSEGV?
Yes. Up to the point where a fatal signal isn't caught and the process
is killed. At that point all threads except the one responsible for the
termination is stopped and then terminated.
> 2. Is this true of POSIX threads in general, or just Linux?
Well, the above is what POSIX requires and what I think we've
implemented. These requirements are essential for programs which do
much of their work in signal handlers. Creating more threads which
mainly just sit around but can react to signals is a valid programming
model.
- --
- --------------. ,-. 444 Castro Street
Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA
Red Hat `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+KM8m2ijCOnn/RHQRAlcEAJ0W27Ju6gq4xhT7A0PGr2IJCGfp0ACfa2NY
2mmvlgXLC2Xm8UYnU+rD6cE=
=7eDw
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2003-01-18 3:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-18 3:24 Question about threads and signals Jamie Lokier
2003-01-18 3:51 ` Ulrich Drepper [this message]
2003-01-18 4:49 ` Jamie Lokier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3E28CF26.6020202@redhat.com \
--to=drepper@redhat.com \
--cc=jamie@shareable.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox