文件名称:a
介绍说明--下载内容均来自于网络,请自行研究使用
编制一个程序,使其实现进程的软中断通信。父进程发信号控制子程序的终止。
使用系统调用fork()创建两个子进程,再用系统调用signal()让父进程捕捉键盘上的中断信号;当捕捉到中断信号后,父进程用系统调用Kill()向两个子进程发出信号,子进程捕捉到信号后分别输出下列信息后终止:
Child Proeess 1 is Killed by Parent!
Child Process 2 is Killed by Parent!
父进程等待两个子进程终止后,输出如下的信息后终止:
Parent Process is Killed!(Parent Process is Killed!
Compile a program that enables the process of soft interrupt communication. The termination of the parent process signal control subroutine.
Using the system call fork () to create two sub processes, and then the system call signal () to the parent process interrupt signal capture on the keyboard; when the capture interrupt signal, the parent process with the system call Kill () to send signals to the two sub process, sub process to capture the signal output respectively after the termination of the following information:
Child Proeess 1, is, Killed, by, Parent!
Child Process 2, is, Killed, by, Parent!
When the parent process waits for the two child process to terminate, the following message is terminated after outputting the following information:
Parent Process is Killed!)
使用系统调用fork()创建两个子进程,再用系统调用signal()让父进程捕捉键盘上的中断信号;当捕捉到中断信号后,父进程用系统调用Kill()向两个子进程发出信号,子进程捕捉到信号后分别输出下列信息后终止:
Child Proeess 1 is Killed by Parent!
Child Process 2 is Killed by Parent!
父进程等待两个子进程终止后,输出如下的信息后终止:
Parent Process is Killed!(Parent Process is Killed!
Compile a program that enables the process of soft interrupt communication. The termination of the parent process signal control subroutine.
Using the system call fork () to create two sub processes, and then the system call signal () to the parent process interrupt signal capture on the keyboard; when the capture interrupt signal, the parent process with the system call Kill () to send signals to the two sub process, sub process to capture the signal output respectively after the termination of the following information:
Child Proeess 1, is, Killed, by, Parent!
Child Process 2, is, Killed, by, Parent!
When the parent process waits for the two child process to terminate, the following message is terminated after outputting the following information:
Parent Process is Killed!)
相关搜索: 进程软中断通信
(系统自动生成,下载前可以参看下载内容)
下载文件列表
软中断通信\a3.c
软中断通信\软中断通信.txt
软中断通信
软中断通信\软中断通信.txt
软中断通信