Annotation of 43BSDTahoe/ucb/dbx/tests/cc/signal.c, revision 1.1

1.1     ! root        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: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.