文件名称:process
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:3.11kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
编写一段源程序,应用系统调用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
process/liux.txt
process
process/liux.txt
process
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.