Ar Mer, 2006-10-18 am 11:52 -0400, ysgrifennodd Alan Stern:
> Don't you want the user process to wait in TASK_INTERRUPTIBLE? It would
> require only a very simple change.
That just makes the problem even worse, to go with the kernel driver
"what the hell do do if.." we get a user space one thats based around
incompatibility with the existing behaviour.
There are much saner ways to sort that out without breaking the API
If its going to be a bounded short wait -> pause
If its might be a long wait -> cached
If its gone for good then error
If the user specified O_NDELAY then -EWOULDBLOCK not wait
That way you don't break anything and you get sensible Unix semantics.
The wait queue Matthew added also means select() can be fitted up to do
the right thing for the O_NDELAY case.
Alan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]