Review Request: Fix hang in kcm_useraccount

Rolf Eike Beer kde at opensource.sf-tec.de
Fri Aug 10 20:22:44 BST 2012


Am Samstag, 11. August 2012, 01:11:52 schrieb Michael Palimaka:
> On 2012-08-11 01:02, Rolf Eike Beer wrote:
> > Am Samstag 11 August 2012, 00:11:37 schrieb Michael Palimaka:
> >> So you are saying:
> >> 
> >> - readAll clears the buffer
> >> - readLine unconditionally calls readAll
> >> - readLine may be called multiple times to read multiple lines
> >> 
> >> Is that correct?
> > 
> > That's how the code looks to me.
> 
> That set of statements is contradictory - how can the buffer be cleared,
> but then read from again?

The process could write something new in the meantime. Or it readLine() could 
just return an empty line.

> >> (Again, I note that in testing, calling readAll then readLine is
> >> successful.)
> > 
> > I.e. readLine() then returns something? Are you sure this has been written
> > by the process before readAll() was called? Strange.
> 
> Yes - the chfn implementation I am using writes "permission denied" and
> immediately terminates. With the latest diff, readAll.isEmpty is false
> so readLine is then executed.

And after the readLine() you have valid input? And you are sure your new 
branch is taken?

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/20120810/6eb1e8f1/attachment.sig>


More information about the kde-core-devel mailing list