文件名称:ProcessManagementExp
- 所属分类:
- Linux/Unix编程
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 3kb
- 下载次数:
- 0次
- 提 供 者:
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
实现进程的软中断通信。
使用系统调用fork()创建两个子进程,再用系统调用signal()让父进程捕捉键盘上来的中断信号(即DEL键);当捕捉到中断信号后,父进程用系统调用kill()向两个进程发出信号,子进程捕捉到信号后分别输出下列信息后终止:
Child Process 1 is Killed by Parent!
Child Process 2 is Killed by Parent!
父进程等待两个子进程终止后,输出如下信息后终止:
Parent Process is killed!-Process to achieve the soft interrupt communications. Requirements: to use the system calls fork () creates two child processes, then the system call signal () to capture the keyboard up to the parent process the interrupt signal (ie, the DEL key) When the capture interrupt signal, the parent process with a system call kill () signal to the two processes, the child process to capture the signal output, respectively, after the termination of the following information: Child Process 1 is Killed by Parent! Child Process 2 is Killed by Parent! parent process to wait for two sub-process termination, output termination of the following information : Parent Process is killed!
使用系统调用fork()创建两个子进程,再用系统调用signal()让父进程捕捉键盘上来的中断信号(即DEL键);当捕捉到中断信号后,父进程用系统调用kill()向两个进程发出信号,子进程捕捉到信号后分别输出下列信息后终止:
Child Process 1 is Killed by Parent!
Child Process 2 is Killed by Parent!
父进程等待两个子进程终止后,输出如下信息后终止:
Parent Process is killed!-Process to achieve the soft interrupt communications. Requirements: to use the system calls fork () creates two child processes, then the system call signal () to capture the keyboard up to the parent process the interrupt signal (ie, the DEL key) When the capture interrupt signal, the parent process with a system call kill () signal to the two processes, the child process to capture the signal output, respectively, after the termination of the following information: Child Process 1 is Killed by Parent! Child Process 2 is Killed by Parent! parent process to wait for two sub-process termination, output termination of the following information : Parent Process is killed!
(系统自动生成,下载前可以参看下载内容)
下载文件列表
kill.c
pipe_mng.c
进程管理实验说明.txt
pipe_mng.c
进程管理实验说明.txt