标签:
#include <signal.h>
#include <sys/types.h>
int kill(pid_t pid, int sig);
int main(int arg, char *args[]) { if (arg > 1) { int pid = atoi(args[1]); kill(pid, SIGKILL); } else { printf("pid = %u\n",getpid()); sleep(60); } return 0; }
#include <signal.h>
int raise(int signo);
#include <unistd.h>
nsigned int alarm(unsigned int seconds);
void catch_Signal(int Sign) { switch(Sign) { case SIGALRM: printf("SIGALRM Signal\n"); } } int main(int arg, char *args[]) { signal(SIGALRM, catch_Signal); alarm(1); pause(); return 0; }
void abort(void);
nsigned int sleep(unsigned int seconds);
标签:
原文地址:http://www.cnblogs.com/shichuan/p/4496338.html