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