passenger stop kill orphan process
I have solve my problem by
restart my app instead of restart passenger
restart app command: passenger-config restart-app [path of my app]
My app is rails and python .
In rails I create a new thread and start a shell command which executes python scripts.
This python script (parent process) will exit quickly, but before it exits it will fork a child process, and the child process will be an orphan process after the parent process exits.
Situation 1:
If I start app by rails: rails s -d
When the python parent process exits and python child process is going:
kill  pid(./tmp/pids/server.pid)
Then the child process will be ok and not be killed. This is what I want.
Situation 2:
If I start app by passenger:
passenger start -e production -d
When the python parent process exits and python child process is going:
passenger stop;
then the child process will be killed.
So I  want to know in situation 2, the child orphan process could not be killed? Has anyone experienced this or knows how to solve it?