[MPlayer-dev-eng] Re: kernel: to do_select(pipe) or not to do
Gábor Lénárt
lgb at lgb.hu
Tue Nov 23 01:23:30 CET 2004
On Mon, Nov 22, 2004 at 05:02:04PM -0500, D Richard Felker III wrote:
> >
> > Maybe I'm wrong at this point but what about if you got "fd is
> > writeable" from select but before reaching write() another
> > thread got control and writes something?
>
> this is not a problem unless you have more than one process/thread
> writing the same fd at the same time, in which case you're either a
> total idiot or you've already carefully thought out what should
> happen. more likely the former if you're using threads to begin
> with... :)
Sure, this is stupid example, but shows that doing select() and
then doing write() using information got by select() is not
a super stable solution at least.
> > But this whole blocking/non-blocking issue from the point of
> > view of the kernel is quite unknown for me, so maybe I'm wrong.
>
> you're just asking about something entirely unrelated to the topic at
> hand.
Not unrelated. Read again. It gives an example when you're
not right (probably). It's anothet question that this example is
totally stupid idea but bugs&co can bre realized even with very
stupid an useless ideas
- Gábor (larta'H)
More information about the MPlayer-dev-eng
mailing list