文件名称:ProcessManagementExp
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:3.31kb
-
已下载: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
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.