[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: KProcess eats SIGCHLD, so pclose() fails
From: David Faure <david () mandrakesoft ! com>
Date: 2001-11-28 21:18:58
[Download RAW message or body]
On Wednesday 28 November 2001 20:28, aleXXX wrote:
> On Wed 28 Nov 01 18:32, David Faure wrote:
> > KProcessController, instantiated by KProcess, seems to grab all SIGCHLD
> > events, even the ones that have nothing to do with KProcess.
>
> After looking at the code, it grabs exactly SIGCHLD and SIGPIPE since it has
> to know when its child dies.
Yes, but maybe there's a way to tell it to ignore a certain pid, or to forward
unknown signals, or...
> And it probably is only caught as long as a KProcess exists.
No, the first KProcess creates a KProcessController, but then that one remains
around... Well, I haven't tested this for sure, but from the code I think it doesn't
matter if there are still kprocesses running or not.
> You could ignore that pclose() returns -1.
I can't, I want the exit code from the process.
> Do you want to run arbitrary "unknown" programs or a special program ?
A special one, that's why I care about the exit code, it has a very precise meaning.
> Usually stdout is closed when the program exits, so if you detect that the
> pipe was closed the app has usually already quit. Then pclose() can't fail.
I don't understand... I read the output of the app, too... but if there's nothing
on stdout, it could either be an error, or a normal case of "no output"...
--
David FAURE, david@mandrakesoft.com, faure@kde.org
http://perso.mandrakesoft.com/~david/ , http://www.konqueror.org/
KDE 3.0: Konquering the Desktops
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic