How to Pause/Resume a process in Linux

CHAD picture CHAD · Jan 8, 2015 · Viewed 16.2k times · Source

I record my program until it closes.

Start Command:

cvlc screen:// --screen-left=0 --screen-top=0 --screen-width=1280 --screen-height=960 --screen-fps=30 \
--sout '#transcode{vcodec=mp2v, vb=800, scale=1, acodec=none}:file{mux=ts, dst=your_video_path_to_be_saved}'

Stop Command:

kill -9 pgrep vlc

That works well, now I need to implement pause method to this program. I need to kill program at pause method then start it on resume method and append new video to older one. How can i do it?

VLC Wiki: Merge

Answer

Skynet picture Skynet · Jan 8, 2015

To pause the process

kill -STOP <PID>

To resume it

kill -CONT <PID>