Review Request: Fix hang in kcm_useraccount

Rolf Eike Beer kde at opensource.sf-tec.de
Wed Aug 8 17:59:55 BST 2012


Am Mittwoch 08 August 2012, 07:59:07 schrieb Michael Palimaka:
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105895/
> -----------------------------------------------------------
> 
> (Updated Aug. 8, 2012, 7:59 a.m.)
> 
> 
> Review request for KDE Base Apps.
> 
> 
> Changes
> -------
> 
> Updated diff as per email conversation.

Seriously, I should stop suggesting anything about this. I seem to make things 
only worse.

Now we have the following situation in case the program has exited (if not the 
behavior is unchanged):

-we read in one line, if it is empty we break. What happens if the first line 
of output is empty and correct output comes later?

-the line is not empty, we continue (new check)

-we check if the line is empty (old check)

So, what now?

I would suggest the following:

-readAll()
-if empty, break
-find a linebreak, if we have one: unreadLine for everything beyond it, cut 
the input line we have
-move the readLine() and the isEmpty() of the old code together in the else 
(i.e. pidExited == NotExited).

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/20120808/81db1dd0/attachment.sig>


More information about the kde-core-devel mailing list