PtyProcess superflous linebreaks

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Tue Nov 20 17:14:18 GMT 2007


On Tuesday 20 November 2007, Thiago Macieira wrote:
> 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().

Ok. Problem is there is no other reading function besides readLine() in 
PtyProcess, yet. Should I try to add one?

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

Or readLine() might be nice enough to give away the incomplete final line of 
output, in this case.

Regards
Thomas
-------------- 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/9f04cd7c/attachment.sig>


More information about the kde-core-devel mailing list