?? 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 + -