My python file generate two child_process. When I run "pm2 start xxx.py",the program woks well. But when I close one child_process, another also paused.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
What's going wrong?
My python file generate two child_process. When I run "pm2 start xxx.py",the program woks well. But when I close one child_process, pm2 will not reload the program. I just want to ask that could pm2 identify child_process and protect it when the program contains child_process?
How could we reproduce this issue?
import multiprocessing as mp
def fun1():
while 1:
print(11111)
def fun2():
while 1:
print(22222)
if __name__ == "__main__":
read_process = mp.Process(target=fun1, args=())
o_process = mp.Process(target=fun2, args=())
read_process.start()
o_process.start()
Supporting information
win 11
python 3.9
$ pm2 start test.py
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Windows 11 case with Python 3.9 using the reported multiprocessing example and pm2 start test.py. Read the PM2 process-launch and child-process handling entry points to determine the current behavior; done means the issue has a documented or tested outcome for closing one child process while the other remains active.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, python
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100