mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 11:41:35 +01:00
start the big userland migration
This commit is contained in:
@@ -8,19 +8,19 @@
|
||||
#include <unistd.h>
|
||||
|
||||
void signal_handler(int sig) {
|
||||
write(STDOUT_FILENO, "cad\n", 4);
|
||||
signal(sig, signal_handler);
|
||||
write(STDOUT_FILENO, "cad\n", 4);
|
||||
signal(sig, signal_handler);
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
int i = 0;
|
||||
/* Disable the forced reboot, enable sending SIGINT to init. */
|
||||
reboot(RB_DISABLE_CAD);
|
||||
int i = 0;
|
||||
/* Disable the forced reboot, enable sending SIGINT to init. */
|
||||
reboot(RB_DISABLE_CAD);
|
||||
signal(SIGINT, signal_handler);
|
||||
while (1) {
|
||||
sleep(1);
|
||||
printf("%d\n", i);
|
||||
i++;
|
||||
}
|
||||
while (1) {
|
||||
sleep(1);
|
||||
printf("%d\n", i);
|
||||
i++;
|
||||
}
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user