home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 8 / CDACTUAL8.iso / share / os2 / varios / apache / emxkill.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-01-28  |  402 b   |  25 lines

  1. /* Test for Apache */
  2.  
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. #include <signal.h>
  6.  
  7. int main (int argc, char *argv[])
  8. {
  9.     int sig, pid;
  10.  
  11.     if (argc != 3) {
  12.         puts ("Usage: emxkill <signal number> <process id>\n");
  13.         return 1;
  14.     }
  15.  
  16.     pid = atoi (argv[2]);
  17.     sig = atoi (argv[1]);
  18.  
  19.     if (kill(pid, sig) == 0)
  20.         return 0;
  21.     else
  22.         return 1;
  23. }
  24.  
  25.