文件名称:process
介绍说明--下载内容均来自于网络,请自行研究使用
编写一段源程序,应用系统调用fork()创建两个子进程,当此程序运行时,在系统中有一个父进程和两个子进程活动。让每一个进程在屏幕上显示一个字符:父进程显示字符“a” 子进程分别显示字符“b”和字符“c”。试观察纪录屏幕上的显示结果,并分析原因。fork()系统调用函数说明、参数值及定义
fork()函数功能:
创建一个新进程
int fork()
其中返回int取值意义如下:
0:创建子进程,从子进程返回的id值
大于0:从父进程返回的子进程id值
-1:创建失败
-The preparation of a section of source code, application system call fork () to create two sub-process, when the program runs, in the system there is a father of two sub-processes and process activities. Let each and every process on the screen one character: the father of the process shows that the characters
fork()函数功能:
创建一个新进程
int fork()
其中返回int取值意义如下:
0:创建子进程,从子进程返回的id值
大于0:从父进程返回的子进程id值
-1:创建失败
-The preparation of a section of source code, application system call fork () to create two sub-process, when the program runs, in the system there is a father of two sub-processes and process activities. Let each and every process on the screen one character: the father of the process shows that the characters
相关搜索: fork
(系统自动生成,下载前可以参看下载内容)
下载文件列表
process
.......\fork.txt
.......\liux.txt
.......\fork.txt
.......\liux.txt