Add SIGSTOP in SIGTSTP to properly stop the process.
[wsti_so.git] / src / process3.c
index b75f903af10e363d5c96d07000fa22609322f025..12efd4090aa71a9d3c51013ffd3acbd7f91d0558 100644 (file)
@@ -31,6 +31,7 @@ void sig_handler(int signo)
        else if (signo == SIGTSTP) {
                fprintf(stderr, "[%s] > Closing pipe\n", "process3");
                close(read_descriptor);
+               raise (SIGSTOP);
        }
        else if (signo == SIGCONT) {
                fprintf(stderr, "[%s] > Opening pipe\n", "process3");