I've started a PHP daemon process via SSH with

php ./my-script.php --daemon

Now I want to quit this process, but I can't.

It's still active in the foreground of my shell and I've hit CTRL + C multiple times, but to no avail.

  • What does your script do with the --daemon option ? – X Tian Mar 2 '14 at 9:25
  • You probably want to issue a SIGKILL (Ctrl-\) rather than a SIGTERM (Ctrl-C). Another alternative is to issue (Ctrl-Z) and then kill %1. – Drav Sloan Mar 2 '14 at 13:50
  • @XTian I'm using Tiny Tiny RSS. – Harold L. Brown Mar 2 '14 at 13:57

You can attempt to create a 2nd session on that server and find your original process running the php script ps ax | grep scriptname note the pid, and then kill it with kill -9 pid

edit 1

Does suspend work CTRL-z

  • Unfortunately I'm not allowed to create a second session. :( – Harold L. Brown Mar 2 '14 at 9:12
  • CTRL + Z did it. – Harold L. Brown Mar 2 '14 at 13:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.