I have a process spawning children with spawnl(P_NOWAIT, …) It seems that
the parent does not receive any SIGCHILD upon the cildrens’ death. I’d
like to receive that signal. What did I do wrong? Does P_NOWAIT result
in no SIGCHILDs being sent? The signal handler works ok.
Thanks / Tom
Tomas H?gstr?m <tomas@scandicraft.se> wrote:
I have a process spawning children with spawnl(P_NOWAIT, …) It seems that
the parent does not receive any SIGCHILD upon the cildrens’ death. I’d
like to receive that signal. What did I do wrong? Does P_NOWAIT result
in no SIGCHILDs being sent? The signal handler works ok.
signal(SIGCHLD, SIG_IGN ) will cause no SIGCHLD’s to be generated, but
you haven’t likely done that as you have a handler.
Have you passed P_NOWAITO instead of P_NOWAIT? That will also cause this.
Have you messed with the qnx_spawn_options global, and possibly set
the _SPAWN_NOZOMBIE in the flags?
(To check, you could always print out the flags entry just before your
spawn call.)
After the child has started, have you tried a “sin fl” to see if the
no zombie bit is set?
-David
Previously, Tomas Högström wrote in qdn.public.qnx4:
I have a process spawning children with spawnl(P_NOWAIT, …) It seems that
the parent does not receive any SIGCHILD upon the cildrens’ death. I’d
like to receive that signal. What did I do wrong? Does P_NOWAIT result
in no SIGCHILDs being sent? The signal handler works ok.
there used to be a problem in the C librarys where SIGCHILD was disabled by accident.
Do you have the latest compiler update?
Thanks / Tom
Thanks. I found the error, I had forgotten to rename P_NOWAITO to P_NOWAIT
in one place…
/ Tom
David Gibbs wrote:
Tomas H?gstr?m <> tomas@scandicraft.se> > wrote:
I have a process spawning children with spawnl(P_NOWAIT, …) It seems that
the parent does not receive any SIGCHILD upon the cildrens’ death. I’d
like to receive that signal. What did I do wrong? Does P_NOWAIT result
in no SIGCHILDs being sent? The signal handler works ok.
signal(SIGCHLD, SIG_IGN ) will cause no SIGCHLD’s to be generated, but
you haven’t likely done that as you have a handler.
Have you passed P_NOWAITO instead of P_NOWAIT? That will also cause this.
Have you messed with the qnx_spawn_options global, and possibly set
the _SPAWN_NOZOMBIE in the flags?
(To check, you could always print out the flags entry just before your
spawn call.)
After the child has started, have you tried a “sin fl” to see if the
no zombie bit is set?
-David
Horst Hannappel <Horst.Hannappel@mbs-software.de> wrote:
Previously, Tomas Hogstrom wrote in qdn.public.qnx4:
I have a process spawning children with spawnl(P_NOWAIT, …) It seems that
the parent does not receive any SIGCHILD upon the cildrens’ death. I’d
like to receive that signal. What did I do wrong? Does P_NOWAIT result
in no SIGCHILDs being sent? The signal handler works ok.
there used to be a problem in the C librarys where SIGCHILD was disabled
by accident.
I should have remembered that one… I fixed the library code. It whappened
if you did a spawn() with P_WAIT, if I remember correctly.
-David