1: /*
   2:  * Test of tracebacks from signal handlers.
   3:  */
   4: 
   5: #include <stdio.h>
   6: #include <signal.h>
   7: 
   8: int catch(), secondcatch();
   9: 
  10: main()
  11: {
  12:     signal(SIGQUIT, catch);
  13:     kill(getpid(), SIGQUIT);
  14:     printf("back in main\n");
  15: }
  16: 
  17: catch()
  18: {
  19:     printf("in catch\n");
  20:     sigsetmask(0);
  21:     signal(SIGQUIT, secondcatch);
  22:     kill(getpid(), SIGQUIT);
  23:     printf("back in catch\n");
  24: }
  25: 
  26: secondcatch()
  27: {
  28:     printf("in secondcatch\n");
  29: }

Defined functions

catch defined in line 17; used 2 times
  • in line 8-12(2)
main defined in line 10; never used
secondcatch defined in line 26; used 2 times
  • in line 8, 21
Last modified: 1985-03-08
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 568
Valid CSS Valid XHTML 1.0 Strict