lkml.org 
[lkml]   [2000]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] thread wakeup fix for 2.4.0-test7
Date
In message <8oci4c$b0l$1@penguin.transmeta.com> you write:
> >Actually, Linus seems to forget about his own idea
> >of returning valid error from close(). Think, how it is possible
> >to return valid error, when fput() is used to close file.
>
> Bzzt. Wrong answer.
>
> My claim is that a user program that does a close() on a file that is in
> use is inherently racy. Is that so hard to understand?

Easy to understand: you're wrong, that's all 8). It makes perfect
sense for the master thread to close the socket every thread is
waiting on, they all wake up, get -EBADF whether they be in read(),
poll(), etc. They then shut down. Neat, huh?

> (I'm also claiming that Linux will give the most reasonable possible
> semantics for the case where you _do_ close the file desciptor when it
> is in use. I still claim that you shouldn't do it.)

No, Solaris is more programmer-friendly here. That doesn't mean Linux
is wrong, just that the above claim is dubious.

Hope that helps,
Rusty.
--
Hacking time.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.068 / U:1.148 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site