信号
来源:互联网 发布:联通软件研究院怎么样 编辑:程序博客网 时间:2024/04/30 01:58
//信号#include <stdio.h>#include <errno.h>#include <string.h>#include <stdlib.h>#include <signal.h>void handler(int signal_num){ switch(signal_num) { case SIGINT: { printf("Ctrl +C\n"); } }}int main(int argc,char *argv[]){ signal(SIGINT,handler); while(1) { printf("hello world\n"); sleep(1); } /*pid_t child; child = fork(); if(child == 0) { printf("Parrent [%d] create child [%d] \n",getppid(),getpid()); exit(0); } else if(child > 0) { printf("Parrent [%d] create success!\n",getpid()); } printf("Parrent [%d] quit!\n",getpid());*/ return 0;}
0 0
- 信号
- 信号
- 信号
- 信号
- 信号
- 信号
- 信号
- 信号
- 信号
- <>信号
- 信号
- 信号
- 信号
- 信号
- 信号
- 信号
- 信号
- 信号
- webStorm 3.0配置使用主题背景色等
- JAX-RS的参考实现:《使用 Jersey 和 Apache Tomcat 构建 RESTful Web 服务》
- poj 1269 Intersecting Lines
- 有名管道
- java多线程(对象和变量的并发访问)
- 信号
- sql server中的 SET NOCOUNT ON 的含义
- 提高C++程序运行效率的10个简单方法
- 共享内存
- 剑指Offer 面试题40:数组中只出现一次的两个数 题解
- 消息队列
- hdu 2459 后缀数组 求最多重复次数子串
- xcode 插件 批量生成属性的懒加载 getter
- 打字练习