[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: KProcess and stdout/stderr!
From: Tim Lee <tlee () tc ! fluke ! com>
Date: 2001-10-29 20:41:39
[Download RAW message or body]
Hi,
I'm using KProcess to run a command that creates interleaved
output from stdout and stderr, example follows:
stdout: Cisco Systems VPN Client Version 3.0.8
stdout: Copyright (C) 1998-2001 Cisco Systems, Inc. All Rights Reserved.
stdout: Client Type(s): Linux
stdout: Running on: Linux 2.4.9-6 #1 Thu Oct 18 09:39:55 EDT 2001 i686
stdout:
stdout: Initializing the IPSec link.
stderr:
stderr: initialization failed
stdout: Disconnecting the IPSEC link.
stdout: The VPN sub-system is busy or has failed.
The lines are marked by the file descriptor they were written
to.
When I use KProcess and the established UNIX sockets I get the
following when I display it as the command runs:
stderr:
stderr: initialization failed
stdout: Cisco Systems VPN Client Version 3.0.8
stdout: Copyright (C) 1998-2001 Cisco Systems, Inc. All Rights Reserved.
stdout: Client Type(s): Linux
stdout: Running on: Linux 2.4.9-6 #1 Thu Oct 18 09:39:55 EDT 2001 i686
stdout:
stdout: Initializing the IPSec link.
stdout: Disconnecting the IPSEC link.
stdout: The VPN sub-system is busy or has failed.
I believe this is because the stdout is no longer attached to
a tty and therefore is buffered. I get none of the stdout
stuff until the command is finishing. The command in question is
a binary only so I can't alter it.
Any ideas how to remove the buffering on stdout, assuming that
is the problem?
Thanks,
--
Tim Lee
R&D Design Engineer
Fluke Networks
6805 Corporate Drive, Suite 100
Colorado Springs, CO 80919
www.flukenetworks.com
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic