Can I send SIGCONT to a running process?
c, linux, signals
Solution
You can do it. TLPI says:
When sent to a stopped process, this signal causes the process to resume (i.e., to be rescheduled to run at some later time). When received by a process that is not currently stopped, this signal is ignored by default. A process may catch this signal, so that it carries out some action when it resumes.
APUE:
Note that the default action for SIGCONT is to continue the process, if it is stopped; otherwise, the signal is ignored.
Problem
I know that SIGCONT continues a process previously stopped by SIGSTOP. Can I use SIGCONT multiple times without a SIGSTOP ? i,e , below sequence is valid ? ``` SIGSTOP to process A : The process stops SIGCONT to process A : Process resumes SIGCONT to process A : Process already runs - this SIGCONT has no effect SIGCONT to process A : Process already runs - this SIGCONT has no effect ... SIGSTOP to process A : The process stops SIGCONT to process A : Process resumes ```