摘要: 一般有两种方式发送信号:raise和kill raise函数原型为: #include <signal.h> int raise(int sig); 该函数向调用的进程或者线程发送信号,形参sig就是需要发送的信号。 返回值:成功返回0,失败返回非零值。需要说明的是,如果信号导致了处理函数(hand 阅读全文
posted @ 2021-02-07 15:14 castor_xu 阅读(220) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <unistd.h> #include <fcntl.h> #include <sys/utsname.h> #include <stdlib.h> #include <string.h> int main() { struct utsname 阅读全文
posted @ 2021-02-07 09:38 castor_xu 阅读(109) 评论(0) 推荐(0) 编辑