I assume you have something like:
// in the parent
Can you post the code snippet of the relevant parts ?
“Michael Kapp” <firstname.lastname@example.org> schrieb im Newsbeitrag
The parent process just checks which process to kick off based upon
configuration and does nothing else. The execv() is to overlay a
new process from the spawner.
The problem is the exec does not return and the process hangs leaving the
original parent that cannot be killed and a zombie child that also cannot
killed. It appears that the exec begins but does not properly overlay the
“dolphin GmbH” <> email@example.com> > wrote in message
news:aklbhl$9dd$> firstname.lastname@example.org> …
Do you call waitpid() to query the exit status of the child ?
if not, may this is the reason for the zombies. The child process
the exit status until you query it with waitpid(). Alternatively you can
P_NOWAITO mode flag in execvpe().
The hang of the ps -ef | … is may because your parent proc creates the
at a very high frequency. Did you checked the return value/errno of the
“Michael Kapp” <> email@example.com> > schrieb im Newsbeitrag
news:akibup$2ec$> firstname.lastname@example.org> …
I am running into problems with the execv() and spawnv() functions in
There are times when the execv() and spawnv() functions never execute
new program or return an error, it just hangs forever. After this
the calling process still shows up when you do a “ps -a” along with a
process that has no name, some sort of zombie and cannot be killed
signal including a kill -9 without rebooting the machine. If I do a
“ps -ef” the program shows up an infinite (sic) amount of times in the
listing and never stops scrolling. If I do a “ps -ef | grep filename”
hangs and never returns.
I noticed that if I touch the executable file without recompiling the
and try to run it again everything seems to work fine, sometimes.
This exact code has been running under QNX4.25 without issue in the
for 2 years but is very inconsistent at best under QNX6.
If anyone has experienced anything similar or knows what could be
this I would appreciate your input.