/* A program that repeatedly sends a signal to another process.
   Written by Andre M. Maier, dhbw@andre-maier.com */

#include <stdio.h>
#include <signal.h>
#include <unistd.h>
#include <stdlib.h>

int main(int argc, char** argv)
{
   if(argc!=3)
   {
      printf("Usage: %s PID SIGNAL_NO\n",argv[0]);
      return 1;
   }
   int pid = atoi(argv[1]);
   int signo = atoi(argv[2]);

   while(1) {
      kill(pid,signo);
      sleep(1);
   }

   return 0;
}
