raise.c 399 B

123456789101112131415161718192021
  1. /*
  2. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  3. * See the copyright notice in the ACK home directory, in the file "Copyright".
  4. */
  5. /* $Id$ */
  6. #if defined(_POSIX_SOURCE)
  7. #include <sys/types.h>
  8. #endif
  9. #include <signal.h>
  10. int _kill(int pid, int sig);
  11. int _getpid(void);
  12. int
  13. raise(int sig)
  14. {
  15. if (sig < 0 || sig > _NSIG)
  16. return -1;
  17. return _kill(_getpid(), sig);
  18. }