Messages in this thread |  | | From | Rusty Russell <> | Subject | Re: [PATCH] thread wakeup fix for 2.4.0-test7 | Date | Mon, 28 Aug 2000 22:22:35 +1100 |
| |
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/
|  |