From kde-core-devel Thu Dec 19 10:30:55 2002 From: Malte Starostik Date: Thu, 19 Dec 2002 10:30:55 +0000 To: kde-core-devel Subject: Re: Fwd: kprocess - close all open files in the child X-MARC-Message: https://marc.info/?l=kde-core-devel&m=104029392830578 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-02=_f/ZA+ne+f3oLDXJ" --Boundary-02=_f/ZA+ne+f3oLDXJ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Description: signed data Content-Disposition: inline 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 > 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; --Boundary-02=_f/ZA+ne+f3oLDXJ Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQA+AZ/fVDF3RdLzx4cRAkVVAJ9LY62A+kVkMoVM7RKts5vf09zwDwCfQcYc 00QAYRe3p8KVECo4Hwo2YnM= =MOxO -----END PGP SIGNATURE----- --Boundary-02=_f/ZA+ne+f3oLDXJ--