p7.5.c
来自「《linux编程技术详解》 linux编程入门的好书」· C语言 代码 · 共 19 行
C
19 行
#include <stdio.h>#include <unistd.h>#include <sys/types.h>int main(void){ pid_t pid; if((pid=fork())<0){ perror("Cannot create the new process"); return 1; }else if(pid==0){ printf("In the child process!\n"); return 0; }else { printf("In the parent process!\n"); return 0; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?