📄 three.c~
字号:
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>#include <stdlib.h>#include <stdio.h>
#include <pthread.h>
#include <linux/sem.h>
#include <linux/shm.h>int main( int argc, char *argv[] ){ pid_t p1,p2,p3,p4;
pid_t t1,t2,t3,t4;
int status; if((p1=fork())==0) { execv("./first",NULL); }else { if((p2=fork())==0) { execv("./second",NULL); }else{ if((p3=fork())==0) { execv("./third",NULL); }else{ waitpid(p1,&status,0);
waitpid(p2,&status,0); waitpid(p3,&status,0); } } } return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -