home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / posix / signal / kill.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-27  |  318 b   |  20 lines

  1. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  2. #include <signal.h>
  3. #include <unistd.h>
  4.  
  5. int
  6. kill(pid_t pid, int sig)
  7. {
  8.   if (pid == getpid()
  9.       || pid == 0
  10.       || pid == -1
  11.       || pid == -getpid())
  12.   {
  13.     if (sig)
  14.       raise(sig);
  15.     return 0;
  16.   }
  17.   else
  18.     return -1;
  19. }
  20.