1
我有一段代碼來執行execvp。一個進程的proc入口
if (0 != child_pid) {
/* Parent Process */
printf("This is parent process: PID: %d\n",getpid());
return child_pid;
} else {
/* Child Process */
printf("This is child process: PID: %d\n",getpid());
printf("Parent process is: PPID: %d\n",getppid());
execvp(program,arg_list);
printf("Checking whether execvp fails/control reaches this line\n");
fprintf(stderr,"An Error occurred during execvp\n");
abort();
}
獲得進程ID(通過getpid()打印)後,我搜索了/ proc/$ PID。但我沒有得到這個過程的入口。這是什麼意思?。一旦進程死亡,Will/proc條目將被清除。