Reputation: 135
I have server running with nohup on port 80. I try
ps aux | grep nohup
and get
root 9234 0.0 0.1 11740 932 pts/1 S+ 15:19 0:00 grep --color=auto nohup
I then try kill -9 11740 (which I believe is the PID) and get an error stating 'no such process." I can't figure out how else to remove this. Any help is appreciated. Thanks
Upvotes: 0
Views: 1109
Reputation: 4189
grep
command itself, not nohup.nohup my_executable
, nohup closes/redirects stdin/stdout/stderr properly, setups necessary signal handlers and replaces itself with my_executable
. Search instead for executable which was started with nohup, e.g. ps aux | grep my_executable | grep -v grep
Upvotes: 1
Reputation: 11104
The process you are seeing is the process from your grep
command. So by the time you are trying to kill it, the process is already over.
To keep it out of the output use:
ps aux | grep nohup | grep -v 'grep'
It looks like you don't have a nohup
process running
Upvotes: 0