[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: RE: Note for users of the KProcess class
From: Christoph Neerfeld <Christoph.Neerfeld () bonn ! netsurf ! de>
Date: 1997-08-13 12:42:11
[Download RAW message or body]
On 07-Aug-97 Christian Czezatke wrote:
>Hi!
>
>I've just noticed that there is still a little problem left with KProcess
>(wich is now in kdecore, btw) and KApplication.
>
>The KApplication constructor installs a signal handler for SIGCHLD just to
>avoid the creation of zombie processes. -- The KApplication constructor
>uses "signal" to install its handler while KProcess uses "sigaction" in
>order to get the "reliable signal" semantics on all plattforms.
>
>However, as I've just found out, this will cause KProcess to malfunction
>and your application to lock up when the first child process exits.
>
>In order to avoid the problem, just add the following line in your app
>after the KApplication constructor:
>
> signal(SIGCHLD,SIG_DFL);
>
>This will cause the default signal handler for SIGCHLD to be re-installed.
>(The default action for SIGCHLD ist to ignore it, btw.)
>
>Please note that this does not cause zombie processes, since KProcess
>installs a signal handler for SIGCHLD itself.
>
>I'll try to get in contact with Kalle when he returns from his holidays.
>
>
> Christian
I inserted: signal(SIGCHLD, SIG_DFL);
after: KApplication a(argc, argv, "klpq" );
Then I start a suprocess and get:
'Could not finish comm setup in parent!'
Then I get some output from the process and the signal indicating that
it has terminated.
Then I restart the suprocess, I get no output, no signal and
KProcess still believes that the process is active, so I can't
restart it once again.
Please help ! Without it there won't be a new version of klpq :-(
Regards,
Chris.
>
>--------------------------------------------------------------------
>| Christian Czezatke, Student of Computer Science at the Vienna |
>| University Of Technology. |
>|------------------------------------------------------------------|
>| email: e9025461@student.tuwien.ac.at |
>--------------------------------------------------------------------
>
>
--------------------------------------------------------------
Christoph Neerfeld <Christoph.Neerfeld@bonn.netsurf.de>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic