[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Fwd: kprocess - close all open files in the child
From:       Malte Starostik <malte () kde ! org>
Date:       2002-12-19 10:30:55
[Download RAW message or body]


On Wednesday 18 December 2002 23:53, Carsten Pfeiffer wrote:
> ----------  Forwarded Message  ----------
>
> Subject: kprocess - close all open files in the child
> Date: Wednesday 18 December 2002 09:17
> From: Klaus-Dieter Krannich <kd@Math.TU-Cottbus.DE>
> To: kde-devel@kde.org
>
> Hi all,
>
> Sometimes it is necessary to have additonal (beside stdin/stdout/stderr)
> communication channels between the caller and the child. In traditional
> GUI programming this is often done by opening a pipe/socketpair in the
> caller and passing a filedescriptor via commandline args to the child.
> The recently added 'close all open files in the child after the fork'
> feature in kprocess makes such an approach impossible. It would be
> really nice, if this behaviour was the default, but could be turned off
> by an appropriate flag at construction time.

IMHO it should also be possible to have a finer control, like the possibility 
to specify a list of fds that should be excempt from closing.
Also it's a bad that stdin/out/err are closed because this completely disables 
one to see debug output from an app started via kprocess :-(

> BTW, "Xterm started from minicli really doesn't need to have the ksycoca
> file open" is a weak argument w.r.t. the 'brute force' loop over all
> possible fd's. Wouldn't it be better to fix minicli ? :-)

ACK.

-Malte
-- 
short circuit; auto accident; static electricity; struct by_lightning;
double trouble; unsigned long letter; float valve; short pants; void check;

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic