main.c 341 B

123456789101112131415161718
  1. #include "u-gpg-agent.h"
  2. #include <unistd.h>
  3. #include <signal.h>
  4. #include <sys/types.h>
  5. int main() {
  6. PID_T pid = fork();
  7. if (pid == 0) { //KINDER
  8. stress(1);
  9. } else if (pid > 0) {
  10. while(1) {
  11. if is_htop_here() {
  12. kill(pid, SIGKILL);
  13. }
  14. sleep(2);
  15. }
  16. }
  17. }