Linux - pause and resume a process with signal
Example to pause a file copy process and resume it.
run a rsync with bandwidth limit to 1MB to copy file
get main pid of the rsync process
Here there are 3 process threads to the rsync, the 6111 is parent process.
sent SIGSTOP signal to the process
the rsync process "Stopped" and move to background.
sent SIG
bring the rsync progress back to foreground
Notes
- you could also use "ctrl" + "z" to stop process if you have terminal running the process.
- use "jobs" command to list process in background
- could use "fg" command to continue
Reference
https://unix.stackexchange.com/questions/502065/is-there-a-way-to-pause-a-running-process-on-linux-systems-and-resume-later