Send the child SIGSTOPs and SIGCONTs

This commit is contained in:
Axel Wagner
2010-08-25 18:31:03 +02:00
parent 3c1a6384ab
commit a83e7699e7
3 changed files with 36 additions and 1 deletions

View File

@ -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);
}
}