mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: Roland McGrath <roland@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sigwait eats blocked default-ignore signals
Date: Wed, 14 Nov 2007 18:53:00 +0300	[thread overview]
Message-ID: <20071114155300.GA12407@tv-sign.ru> (raw)
In-Reply-To: <20071114073249.CEECC26F8B6@magilla.localdomain>

On 11/13, Roland McGrath wrote:
>
> > But I suspect we have other issues here. Let's suppose we have threads T1
> > (main) and T2. T2 blocks SIGCHLD and does sigwait(SIGCHLD).
> > 
> > Now, we send SIGCHLD to the thread group. The signal is lost again because
> > sig_ignored() returns true on T1's side.
> > 
> > Is this OK? [...]
> 
> Yes, it's OK if T1 has SIGCHLD unblocked.  When there are multiple threads
> that either don't block the signal or are in sigwait for it, then it can go
> to any of them and there are no guarantees at all about which.  So we
> simply say that the signal went to the thread not in sigwait that has that
> signal unblocked (T1).  When it got there, it was ignored.  The user
> semantics are equivalent even if that thread never actually woke and
> dequeued the signal to ignore it.

Yes.

I misunderstood the required semantics for sigwait(), thanks Roland.

Oleg.


      reply	other threads:[~2007-11-14 15:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-12 23:41 Roland McGrath
2007-11-13 15:56 ` Oleg Nesterov
2007-11-13 23:32   ` Roland McGrath
2007-11-14 15:53     ` Oleg Nesterov [this message]

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=20071114155300.GA12407@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roland@redhat.com \
    --cc=torvalds@linux-foundation.org \
    /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

all inboxes | Powered by JetHome®