-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgodmode.c
More file actions
32 lines (30 loc) · 697 Bytes
/
godmode.c
File metadata and controls
32 lines (30 loc) · 697 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
void handler(int sig)
{
printf("U can't touch this. Break it down. Stop Hammer time!\n");
if (fflush(NULL) != 0) {
perror("Ouch! (^_^')");
}
}
int main(void)
{
unsigned int t = 999999999;
struct sigaction new;
struct sigaction old;
new.sa_handler = &handler;
int i;
printf("Become a politician!\n");
for (i = 1; i < 50; i++) {
if (sigaction(i, &new, &old) != 0) {
perror("Cannot ignore signal T_T!");
fprintf(stderr, "Signal %d\n", i);
}
}
while (t > 0) {
t = sleep(t);
}
printf("This should never runs\n");
return 0;
}