How to suspend / resume a process in Linux
I am recording my program before it closes.
Run 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
This works well, now I need to implement a pause method for this program. I need to kill the program using the pause method, then run it on the resume method and add the new video to the older one. How can i do this?
+3
source to share
2 answers
Ctrl+ z(SIGTSTP) from the shell stops (for now we will probably use the term "suspend", which is the bash man page). The process can be continued ("resumed") with the fg (foreground) or bg (background) commands.
kill -9 does not stop the process, it kills it (SIGKILL). I mention this because the wording is ambiguous here.
+3
source to share