Suicidal Threads

Quick question,

I’ve got a process A that spawns a process B using spawnlp(P_NOWAIT,etc…) and then goes and does other stuff.

Meanwhile B runs its code, and all goes well and ends. Only thing is that B is a zombie, and remains a Zombie untill I terminate A.

Now is there an easy way to get B to kill itself without bothering A?



I would start by reading the online documentation on spawn().

It’s waiting around for you to read it’s return code with wait(). You can read it, or spawn it with NO_ZOMBIE in the first place.

Come on Mitchell you used to be a teacher, don’t let them have it that easy :wink: Help them develop learning skills, lol!


Thing is, I’ve been working on this problem for the past two weeks or so, I’ve skimmed through a bunch of documentation and course notes, and don’t remember seeing NO_ZOMBIE anywhere (its not in the spawn or spawnlp documentation from what I remember)…

I was under the impression that P_NOWAIT would inform the process not to wait. Looks like I was wrong, but this seems to be a push in the right direction.



It’s there all right, although it’s not in 6.3.0, you need one of the service packeP which upgrade the doc)

On google I typed QNX6 zombie and the FIRST link that came up was: … &view=next

Did you try P_NOWAITO

Sorry don’t know you, but I do get the sense that more on more on the forums that people don’t even take the time to read or search for the info. It’s either because they are lazy or don’t know how and where to look for the info. Which is why lately I have been trying to point people to the information or how to get to it. Don’t mean any disrespect.


Yea, I wanted to mention that P_NOWAITO is the _SPAWN_NOZOMBIE for spawnlp.

And its all good, I can respect that you want people to try and find answers. I actually don’t use forums that often cause people will usually suggest stuff I’ve already tried, and I get nowhere fast.

In this case, however, it turned out for the best.




Well I didn't give him the right directive <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) -->, so I knew he'd have to go searching.  I agree that we should not act as surrogates for people doing their home work, but as you know, when you start something new it tends to be overwhelming.   Often times the simplest things take hours to figure out.  Then you when you find out you bang your head on the wall when you see how easy they are.  The whole Zombie thing is a little obsure.  I don't know if linux has anything equivalent.   I figure if someone asks, they are usually about hurt their head on the wall, so...