Advertisement
Guest User

Untitled

a guest
Mar 21st, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include <unistd.h>
  2. #include <signal.h>
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5.  
  6. void handler(int signum){
  7. printf("Wyslano sygnal SIGINT");
  8. exit(signum);
  9. }
  10.  
  11. int main(){
  12. signal(SIGINT, handler);
  13. raise(SIGINT); //ty zamień tę linijkę na kill(getpid(), SIGINT);
  14. return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement