zapty / forever-service

Provision node script as a service via forever, allowing it to automatically start on boot, working across various Linux distros and OS
https://github.com/zapty/forever-service
MIT License
594 stars 65 forks source link

Starting service for python script generates 2 different processes #39

Closed pedroetb closed 8 years ago

pedroetb commented 8 years ago

When starting a service installed to run a python script, it works properly, but then it creates 2 separate processes.

I don't know if this is the normal behaviour, but stopping the service only stop one of the two processes, so it keeps alive all the time.

Is this a bug? Any workaround?

Thanks!

arvind-agarwal commented 8 years ago

forever-service uses forever internally to launch the process. So basically there is a forever monitor process and actual script process. So one nodejs process and one python in this case. If you are seeing two python processes it is most likely that your script is invoking more processes, and forever-service will only try to stop the main processes and not child processes of those. (In most cases). So i would recommend checking your script.

pedroetb commented 8 years ago

Yes, I was checking it and I think the same, may be a child process of the python script.

So the issue is resolved now (that was fast!). Thanks!