Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void sigint_handler(int signo) //Ana Filipa da Cruz Fernandes e Helder Alexandre Santos Moreira
- {
- signal(SIGINT, SIG_IGN);
- if (pid_child != -1) {
- kill(pid_child,SIGKILL);
- printf("\n");
- }
- else write(STDOUT_FILENO,"\nmsh_v6>>",9);
- pid_child = -1;
- signal(SIGINT, sigint_handler);
- }
- if(signal(SIGINT, sigint_handler) < 0)
- return 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement