日期:2014-05-16 浏览次数:20659 次
setitimer(ITIMER_REAL, &timer, NULL); act.sa_handler = handler; sigemptyset(&act.sa_mask); act.sa_flags = 0; sigaction(SIGALRM, &act, 0); while(1) { pause(); }
pid = fork(); if(pid == 0) { execv(argv[0], argv); exit(0); } else if(pid > 0) { exit(0); } else { exit(-1); }