Send the child SIGSTOPs and SIGCONTs
This commit is contained in:
@ -176,7 +176,7 @@ void start_child(char *command) {
|
||||
}
|
||||
|
||||
/*
|
||||
* kill()s the child-prozess (if existend) and closes and
|
||||
* kill()s the child-process (if existent) and closes and
|
||||
* free()s the stdin- and sigchild-watchers
|
||||
*
|
||||
*/
|
||||
@ -186,3 +186,23 @@ void kill_child() {
|
||||
}
|
||||
cleanup();
|
||||
}
|
||||
|
||||
/*
|
||||
* Sends a SIGSTOP to the child-process (if existent)
|
||||
*
|
||||
*/
|
||||
void stop_child() {
|
||||
if (child_pid != 0) {
|
||||
kill(child_pid, SIGSTOP);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Sends a SIGCONT to the child-process (if existent)
|
||||
*
|
||||
*/
|
||||
void cont_child() {
|
||||
if (child_pid != 0) {
|
||||
kill(child_pid, SIGCONT);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user