当前位置: 技术问答>linux和unix
linux进程fork求教,谢谢
来源: 互联网 发布时间:2016-09-18
本文导语: 求教,源程序如下(t1.c): #include #include #include int main() { pid_t child = 0; int i,n; i = 0; n = 0; printf("%d befor %dn",getpid(),i); if((child = fork())
求教,源程序如下(t1.c):
#include
#include
#include
int main()
{
pid_t child = 0;
int i,n;
i = 0;
n = 0;
printf("%d befor %dn",getpid(),i);
if((child = fork())
#include
#include
#include
int main()
{
pid_t child = 0;
int i,n;
i = 0;
n = 0;
printf("%d befor %dn",getpid(),i);
if((child = fork())