I have a possible theory for this.
When you run the application as
$ rake resque:work QUEUE='*' &
[1] 13031
The application inteally does a fork+exit, to run in background.
C code equivalent of that would be:
if(fork()) exit(0);
So, the process with PID==13031 will spawn a child process & exit itself. The child will keep ruing in background & will be inherited by the init process (PID==1).
You can see if this is the case, press another enter key after starting the rake command. Do you see prints like this?
[1]+ Done rake resque:work QUEUE='*'
Try ruing ps in terminal. That should show the child process PID. If you kill that, the daemon should exit.
برچسب:
نویسنده: استخدام کار