User: Password:
|
|
Subscribe / Log in / New account

Re: [PATCH] kdesu broken

From:  Linus Torvalds <torvalds-AT-linux-foundation.org>
To:  Alan Cox <alan-AT-lxorguk.ukuu.org.uk>
Subject:  Re: [PATCH] kdesu broken
Date:  Tue, 28 Jul 2009 11:44:00 -0700 (PDT)
Message-ID:  <alpine.LFD.2.01.0907281141070.3186@localhost.localdomain>
Cc:  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>, LKML <linux-kernel-AT-vger.kernel.org>, Andrew Morton <akpm-AT-linux-foundation.org>
Archive-link:  Article



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


(Log in to post comments)


Copyright © 2009, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds