home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_09_03 / 9n03124a < prev    next >
Text File  |  1991-01-16  |  335b  |  26 lines

  1.  
  2. int
  3. cmd_trap(action,list,count)
  4. char *action;        /* eval upon signal */
  5. int *list;        /* list of sigs */
  6. int count;        /* how many sigs */
  7. {
  8.     int i;
  9.  
  10.     for (i=0;i<count;i++,list++) {
  11.         actions[*list] = action;
  12.         signal(*list,sig_handler);
  13.     }
  14. }
  15.  
  16. void
  17. init_trap()
  18. {
  19.     int i;
  20.  
  21.     for (i=0;i<NSIG;i++) actions[i] = 0;
  22. }
  23.  
  24.  
  25.  
  26.