From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Jan Kiszka <jan.kiszka@domain.hid>
Cc: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] xnselect_destroy fails to wake up waiters
Date: Wed, 10 Feb 2010 18:17:56 +0100 [thread overview]
Message-ID: <4B72EA44.2090706@domain.hid> (raw)
In-Reply-To: <4B72E7E8.2050603@domain.hid>
Jan Kiszka wrote:
> Gilles Chanteperdrix wrote:
>> Jan Kiszka wrote:
>>> Gilles Chanteperdrix wrote:
>>>> Jan Kiszka wrote:
>>>>> Hi Gilles,
>>>>>
>>>>> I tend to think that xnselect_destroy should signal an event on the
>>>>> dying fd instead of just clearing the binding. The task blocking on
>>>>> select currently does not get a hint that the fd is dead and will block
>>>>> on select until some other event arrives. That's unfortunately not
>>>>> standard conforming.
>>>> Ok. Got it, I was mixing xnselect_destroy and xnselector_destroy. Yes,
>>>> right, something should be done. What is supposed to happen? Is it
>>>> supposed to be signaled as an exceptional condition?
>>>>
>>> It should be signaled so that the caller tries to read/write/whatever
>>> and then gets the information that the fd is down.
>> Looks to me like you get a wakeup for nothing... From the spec:
>> http://www.opengroup.org/onlinepubs/009695399/functions/select.html
>>
>> I do not see anything specified for the fds closure.
>
> "A descriptor shall be considered ready for reading when a call to an
> input function with O_NONBLOCK clear would not block, whether or not the
> function would transfer data successfully. (The function might return
> data, an end-of-file indication, or an error other than one indicating
> that it is blocked, and in each of these cases the descriptor shall be
> considered ready for reading.)"
Ok. But I need to think a bit for a correct implementation. The naïve
implementation would result in the closed fd being constantly signaled
and select no longer blocking.
--
Gilles.
next prev parent reply other threads:[~2010-02-10 17:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-10 16:15 [Xenomai-core] xnselect_destroy fails to wake up waiters Jan Kiszka
2010-02-10 16:19 ` Gilles Chanteperdrix
2010-02-10 16:32 ` Gilles Chanteperdrix
2010-02-10 16:37 ` Jan Kiszka
2010-02-10 16:51 ` Gilles Chanteperdrix
2010-02-10 17:07 ` Jan Kiszka
2010-02-10 17:17 ` Gilles Chanteperdrix [this message]
2010-02-10 17:31 ` Gilles Chanteperdrix
2010-02-10 18:26 ` Jan Kiszka
2010-02-10 18:51 ` Gilles Chanteperdrix
2010-02-10 18:59 ` Jan Kiszka
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=4B72EA44.2090706@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=jan.kiszka@domain.hid \
--cc=xenomai@xenomai.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.