【发布时间】:2021-08-13 08:30:23
【问题描述】:
#include<stdio.h>
#include<unistd.h>
int main(){
int x;
pid_t myPID,childPID;
x=10;
myPID = getpid();
childPID=fork();
printf("%s \n","how are you");
return 0;
}
return ans this format.not print new line.
bobi@bobi-VirtualBox:~/code$ gcc parent_child.c -o parent_child
bobi@bobi-VirtualBox:~/code$ ./parent_child
how are you
bobi@bobi-VirtualBox:~/code$ how are you
【问题讨论】:
-
代码清晰。你对应该发生的事情有什么期望?大概它与发生的事情不符。
-
你好吗 bobi@bobi-VirtualBox:~/code$ 你好吗这部分显示你好吗,这个格式
-
请将此格式正确地添加到您的问题中。在 cmets 中没有可用的格式。