FrontPage|FindPage|TitleIndex|RecentChanges|RSS Signal
 

SignalÀ» ÀÌ¿ëÇؼ­ Á¾·áó¸®(¹«ÇÑ·çÇÁ ºüÁ®³ª¿À±â) #

#include <signal.h>

bool is_term = false;

void sig_term(int signo)
{
    is_term = true;
}

int main(void)
{
    ....

    signal(SIGTERM, (void (*)(int))sig_term);
    signal(SIGINT,  (void (*)(int))sig_term);


    ....
    while(! is_term){
        // ¹«ÇÑ·çÇÁ
    }

    ....
    // ¿©±â¼­ Á¾·áó¸® µî..
} 

last modified 2004-07-01 10:52:53
EditText|FindPage|DeletePage|LikePages|