Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <signal.h>
- #include <stdlib.h>
- #include <unistd.h>
- void handler(int);
- int main(void) {
- signal(SIGINT, handler);
- while (1)
- pause();
- return 0;
- }
- void handler(int sig) {
- printf("Le contrôle-C est désactivé\n Quitter (q) ? : ");
- char c;
- c = getchar();
- if ('q' == c)
- exit(0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement