[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.01.0907281141070.3186@localhost.localdomain>
Date: Tue, 28 Jul 2009 11:44:00 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Alan Cox <alan@...rguk.ukuu.org.uk>
cc: OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>,
"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
"Rafael J. Wysocki" <rjw@...k.pl>, Ray Lee <ray-lk@...rabbit.org>,
LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] kdesu broken
On Tue, 28 Jul 2009, Alan Cox wrote:
>
> If you are asking that question I don't think you understand the bug
> report.
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
> read()
> EAGAIN
> shit_myself();
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.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists