Multiprocessing zombie processes

N

Navkirat Singh

Hi,

I have been meddling around with forking and multiprocessing. Now both of them spawn new processes from parent (atleast from what I have understood). I have been able to reproduce a zombie state in a fork with:

import os,time

print('before fork',os.getpid())

pid = os.fork()

if pid:
print('child: ',pid)
time.sleep(120)

Now doing a ps ax | grep <pid> I can find a zombie child process, but I am not being able to reproduce the same with multiprocessing. Am I missing something? Or multiprocessing does not have the zombie problem?

Regards,
Nav
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top