2016年9月7日

Linux共享库 日志方法

摘要: mylog.h mylog.c makefile 阅读全文

posted @ 2016-09-07 23:32 寒魔影 阅读(565) 评论(0) 推荐(0)

Linux Linux程序练习七

摘要: 题目:实现两个程序mysignal、mycontrl,mycontrl给mysignal发送SIGINT信号,控制mysignal是否在屏幕打印“hello”字符串。 //捕捉信号 #include #include #include #include #include #include int flag=0; void catch_sig(int sign) { ... 阅读全文

posted @ 2016-09-07 22:06 寒魔影 阅读(518) 评论(0) 推荐(0)

Linux Linux程序练习六

摘要: upper.h upper.c test1.c 运行结果 阅读全文

posted @ 2016-09-07 21:16 寒魔影 阅读(407) 评论(0) 推荐(0)

Linux Linux程序练习五

摘要: 题目:编写两个进程a和b,利用共享内存技术,a向共享内存写字符串,b将从共享内存中读到的字符串在屏幕上打印出来。 //创建共享内存区 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #inc 阅读全文

posted @ 2016-09-07 21:14 寒魔影 阅读(428) 评论(0) 推荐(0)

Linux 守护进程一

摘要: 启动守护进程shell脚本 关闭守护进程shell脚本 阅读全文

posted @ 2016-09-07 16:55 寒魔影 阅读(1067) 评论(0) 推荐(0)

Linux 改进捕捉信号机制(sigaction,sigqueue)

摘要: sigaction函数 sigaction函数的功能是用于改变进程接收到特定信号后的行为。 int sigaction(int signum, const struct sigaction *act,struct sigaction *oldact); 参数 --第一个参数是信号的值,可以为除了SIGKILL及SIGSTOP外的任何一个特定有效的信号(因为这两个信号定义了自己的处理函数,将导致信... 阅读全文

posted @ 2016-09-07 07:37 寒魔影 阅读(4897) 评论(0) 推荐(0)

导航