Messages in this thread | | | Date | Mon, 27 Jul 2009 22:20:10 +0100 | From | Alan Cox <> | Subject | Re: [PATCH] kdesu broken |
| |
> > My T60p lenovo laptop. If you can send me a debug prink patch i can redo the > > test with the patches. I don't know what data i should start collecting so > > that it make sense. This is the patch i tried > > If I read that part of emacs correctly, it seems to be assuming the data > was already sent to master side if the child process was exited.
Oops.. that would be rather buggy.
It is true that the data has left the slave. It is not neccessarily true the data has arrived on the master before the call to close() completes.
We can fake that but what the hell are the semantics if the process on the master blocks or if both processes each end fill the queue and then close so no data can be consumed.
> And if it's right, unfortunately, I guess we can't return -EAGAIN in > this case to preserve behavior.
To avoid the EAGAIN the close needs to block until all queued I/O has been processed by the ldisc the other end. That's not standards guaranteed or even what happens with a non pty port, but it is doable unless you take signals - we can't block signals or it can all deadlock.
| |