Review Request: Fix hang in kcm_useraccount

Rolf Eike Beer kde at opensource.sf-tec.de
Thu Aug 9 17:46:04 BST 2012


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20120809/9254724e/attachment.sig>


More information about the kde-core-devel mailing list