How to suspend and resume Linux processes
You can use kill to stop the process.
For a 'polite' stop to the process (prefer this for normal use), send SIGTSTP:
kill -TSTP [pid]
For a 'hard' stop, send SIGSTOP:
kill -STOP [pid]
Note that if the process you are trying to stop by PID is in your shell's job table, it may remain visible there, but terminated, until the process is fg'd again.
To resume execution of the process, sent SIGCONT:
kill -CONT [pid]
For a 'polite' stop to the process (prefer this for normal use), send SIGTSTP:
kill -TSTP [pid]
For a 'hard' stop, send SIGSTOP:
kill -STOP [pid]
Note that if the process you are trying to stop by PID is in your shell's job table, it may remain visible there, but terminated, until the process is fg'd again.
To resume execution of the process, sent SIGCONT:
kill -CONT [pid]
Comments
Post a Comment