Files
linux-kernel-module-cheat/userland/count.c
Ciro Santilli 六四事件 法轮功 1a0d15ca86 userland: convert make to python
2019-03-12 10:01:38 +00:00

20 lines
365 B
C

#define _XOPEN_SOURCE 700
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char **argv) {
unsigned long i = 0, max;
if (argc > 1) {
max = strtoul(argv[1], NULL, 10);
} else {
max = ULONG_MAX;
}
while (i < max) {
printf("%lu\n", i);
i++;
sleep(1);
}
}