lkml.org 
[lkml]   [2009]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kdesu broken


On Tue, 28 Jul 2009, Alan Cox wrote:
>
> We don't ignore it.

Yes we do. Look at Ogawa-san's patch. And read my email answer to it.

> What goes in one end comes out the other after tty
> processing (ldisc, echo etc). Reliably. Both the EOF fix and the
> tty->low_latency fix cure that. [The low latency one also provides the
> *exact* same semantics as we had prior to 2.6.31-rc as well]

I agree that the low-latency thing should fix things, and I applied it.
But I think that Ogawa's patch is fundamentally "correct" at a much higher
level. Rather than depend on low-latency being set, it just "Does The
Right Thing(tm)", by making sure that readers never even look at the EOF
bits etc until they have flushed the tty ldisc state.

> If I understand Ogawa correctly then what emacs thinks is true is quite
> different: Emacs thinks that
>
> write(pty, "data", length)
> close(pty)
> exit()
>
> will always ensure that the other end has already got the data before
> close() completes - or to be more exact before the parent receives SIGCLD.

.. and depending on what emacs does with signals and it's select() loop,
that may actually be _entirely_reasonable_.

Imagine being in 'select()' (or read, for that matter), and getting EINTR
due to SIGCHLD. What is the correct expectations?

The correct expectation is that the select() (or read()) should have
returned any data that it saw _before_ it returns EINTR.

Linus


\
 
 \ /
  Last update: 2009-10-18 23:28    [W:0.147 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site