PtyProcess superflous linebreaks

Thiago Macieira thiago at kde.org
Tue Nov 20 16:57:55 GMT 2007


Em Tuesday 20 November 2007 17:48:28 Thomas Friedrichsmeier escreveu:
> The most obvious solution would be to make the readLine() return value
> include the newline character if there is one, instead of stripping it, as
> it does currently. The return value would then include information on
> whether a full line was read, or maybe only a few characters.

Suggestion: make readLine return either a full line, with the line-ending 
stripped, or nothing at all. If it can't read a full line, then there was no 
line to be read and, therefore, readLine can't return anything.

The consequence of this is that nothing is shown until a full line is output. 
If this isn't desired, the code shouldn't be using readLine().

Also note that the process can exit without outputting a newline, so when it 
finishes, the code has to read without using readLine.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071120/a4e4e84e/attachment.sig>


More information about the kde-core-devel mailing list