刘昆
+《Linux内核分析》MOOC课程http://mooc.study.163.com/course/USTC-1000029000 ”
一、本文用到的三个源文件代码如下,三个进程将使用同一个进程号,第三个进程执行系统命令查看当前进程使用的动态库信息
//第一个进程,通过execv执行当前目录下进程2
#include <stdio.h>
#include <unistd.h>
int main(){
printf("This is the first process, PID = %d\n",getpid());
execv("./2",NULL);
}
//第二进程,通过EXEC执行新的进程3
#include <stdi