Thread: signal.h

  1. #1
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,743

    signal.h

    who here has experience with signal.h? I need some help with it...I have searched through the documentation of signal.h and asked some people about it, but so far no luck. I need some help understanding what exactly this code does:

    Code:
    //i know what this does:
    static int done = 0;
    void poked(int sig)
    {
    	done = 1;
    }
    
    //more code
    
    .....code.....
    
    //its this part i dont understand:
    
    #ifdef SIGHUP
    	signal(SIGHUP, poked);
    #endif
    	signal(SIGINT, poked);
    #ifdef SIGQUIT
    	signal(SIGQUIT, poked);
    #endif
    	signal(SIGTERM, poked);
    Anybody have experience with the signal function (in signal.h)? Thanx.
    My Website

    "Circular logic is good because it is."

  2. #2

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. header signal.h
    By toshog in forum C Programming
    Replies: 3
    Last Post: 06-28-2008, 03:05 PM