Am Donnerstag, 9. August 2012, 20:24:26 schrieb Michael Palimaka: > On 2012-08-09 19:57, Rolf Eike Beer wrote: > > Ehm, no. If you don't unreadLine() but readLine() you will now discard > > the data previously read in by readAll() and only have the new input > > from readLine() which will be empty for sure. The case I'm describing > > here is: the process already exited and has written data.
> Huh, what am I missing? Looking in process.cpp from kdelibs, readLine > unconditionally calls readAll, so it should be safe to skip the > unreadLine, right? It works in testing with chfn denied - the kcm > correctly reads the error message. Ehm, no. readLine() unconditionally calls readAll(). But that will also clear the input buffer of the process object. So there is nothing left to read on the next readLine() or readAll() call. Eike
signature.asc
Description: This is a digitally signed message part.