home *** CD-ROM | disk | FTP | other *** search
/ Super PC 34 / Super PC 34 (Shareware).iso / spc / UTIL / DJGPP2 / V2 / DJLSR200.ZIP / src / libc / posix / signal / sigactio.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-02  |  384 b   |  20 lines

  1. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  2. #include <signal.h>
  3.  
  4. int
  5. sigaction(int _sig, const struct sigaction *_act, struct sigaction *_oact)
  6. {
  7.   if (_oact)
  8.   {
  9.     /* FIXME */
  10.     _oact->sa_handler = SIG_DFL;
  11.     sigemptyset(&_oact->sa_mask);
  12.     _oact->sa_flags = 0;
  13.   }
  14.   if (_act)
  15.   {
  16.     signal(_sig, _act->sa_handler);
  17.   }
  18.   return 0;
  19. }
  20.