Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question
    
What does your script do with the --daemon option ? –  X Tian Mar 2 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 at 13:50
    
@XTian I'm using Tiny Tiny RSS. –  Harold L. Brown Mar 2 at 13:57

1 Answer 1

up vote 0 down vote accepted

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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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