public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Olaf Dietsche <olaf.dietsche--list.linux-kernel@exmail.de>
To: ptb@it.uc3m.es
Cc: "Linux Kernel" <linux-kernel@vger.kernel.org>
Subject: Re: [OT] Interrupting select.
Date: 04 May 2001 22:59:20 +0200	[thread overview]
Message-ID: <87n18s96fr.fsf@tigram.bogus.local> (raw)
In-Reply-To: <200105022303.f42N36825429@oboe.it.uc3m.es>
In-Reply-To: <200105022303.f42N36825429@oboe.it.uc3m.es>

Hi,

"Peter T. Breuer" <ptb@it.uc3m.es> writes:

> "A month of sundays ago Alan Cox wrote:"
> > > What IS the magic combination that makes select interruptible
> > > by honest-to-goodness non-blocked signals!
> > man
> > 
> > [seriously man sigaction]
> 
> Equally seriously .. all signals are unblocked in my code and always
> have been. The processes receive signals vurrrrry happily. Except when
> they are in a select-with-timeout loop, when they keep going round the
> loop poking their head out of the select every 5s, and taking no notice
> of the murderous hail of die die die die die stuff being slammed at
> them.
[snip]
> Looking at the kernel code in select.c. I see it's implemented by poll
> (I knew that). sys_select calls do_select and I can't for the life of
> me see where anyone sets a signal mask. OTOH if all signals are
> masked by default when syscalls are made (I don't know, but it seems
> possible) then I can't see where interrupts are allowed again.
> 
> The man page for select says nothing about it being interruptible, or
> not. 
> 
> This has been in the back of my mind for months. I'm glad somebody
> asked about it!

I'm not really sure, what you're asking for. Select() is interruptible.

But: if you have multiple threads, the signal may be delivered to any
thread. So, what you may see, is, that the signal is delivered to a
thread, but the signaled thread is not the thread waiting in the
select() call.

Therefore it _seems_, as if select() is not interruptible, but it
surely is.

Regards, Olaf.

  parent reply	other threads:[~2001-05-04 21:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-02 21:46 [OT] Interrupting select Laramie Leavitt
2001-05-02 21:56 ` Peter T. Breuer
2001-05-02 22:21   ` Alan Cox
2001-05-02 23:03     ` Peter T. Breuer
2001-05-03  0:01       ` Alan Cox
2001-05-04 20:59       ` Olaf Dietsche [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-05-02 23:44 Peter T. Breuer
2001-05-06 16:44 ` Stephen Wille Padnos

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=87n18s96fr.fsf@tigram.bogus.local \
    --to=olaf.dietsche--list.linux-kernel@exmail.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ptb@it.uc3m.es \
    /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