PtyProcess superflous linebreaks
Oswald Buddenhagen
ossi at kde.org
Tue Nov 20 18:54:19 GMT 2007
On Tue, Nov 20, 2007 at 06:27:25PM +0100, Thiago Macieira wrote:
> Em Tuesday 20 November 2007 18:14:18 Thomas Friedrichsmeier escreveu:
> > > 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.
>
> Then it shouldn't be called readLine.
>
that's unreasonable and inconsistent with qt (as if somebody would care
:-P).
one problem is that if only a prompt is read from the pty, there is
simply no newline - and that's sort of the normal case. guess the
function should timeout after 100ms or so and return that - whether it
should still be named readLine at that point is another quesiton. on
top of that, the newline should not be stripped.
btw, i'm all for rewriting kdesu anyway. :)
--
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Chaos, panic, and disorder - my work here is done.
More information about the kde-core-devel
mailing list