signal.h

This is a discussion on signal.h within the C++ Programming forums, part of the General Programming Boards category; who here has experience with signal.h? I need some help with it...I have searched through the documentation of signal.h and ...

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

    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
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136

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, 04:05 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21