⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 three.c~

📁 文件拷贝 在linux环境下开发的程序 虽然很简单
💻 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 + -