|| ||Linus Torvalds <torvalds-AT-linux-foundation.org> |
|| ||Alan Cox <alan-AT-lxorguk.ukuu.org.uk> |
|| ||Re: [PATCH] kdesu broken |
|| ||Tue, 28 Jul 2009 11:44:00 -0700 (PDT)|
|| ||OGAWA Hirofumi <hirofumi-AT-mail.parknet.co.jp>,
"Aneesh Kumar K.V" <aneesh.kumar-AT-linux.vnet.ibm.com>,
"Rafael J. Wysocki" <rjw-AT-sisk.pl>, Ray Lee <ray-lk-AT-madrabbit.org>,
Andrew Morton <akpm-AT-linux-foundation.org>|
|| ||Article, Thread
On Tue, 28 Jul 2009, Alan Cox wrote:
> If you are asking that question I don't think you understand the bug
I don't think YOU understand what I'm saying.
> > The correct expectation is that the select() (or read()) should have
> > returned any data that it saw _before_ it returns EINTR.
> read() handles that correctly, has always done so.
> emacs from the traces does this
> set O_NDELAY
> wait for SIGCLD
Go back and read my email.
Emacs is ENTIRELY PROPER in doing that. If it has gotten the SIGCHLD, then
it damn well should know that the data is buffered already, since the
child sure as hell isn't writing any more. So if it gets EAGAIN due to the
SIGCHLD, it can assume that there isn't going to be any more data.
My point is that a program _should_ be able to depend on simple causality
when it comes to ordering rules. If the child did a write() before
exiting, then we should see the data before SIGCHLD.
It's really that simple.
to post comments)