Linux parent process and child process when 'sudo'

时间:2016-09-03 01:03:26   收藏:0   阅读:248

如果在一般用户下如user,执行sudo命令,会产生两个进程。

ps -ef | grep Container

root 4305 643 0 16:37 pts/39 00:00:00 sudo ./ContainerCompilation.sh
root 4306 4305 0 16:37 pts/39 00:00:00 /bin/bash ./ContainerCompilation.sh

4306进程的父进程是4305,也就是说unix先生成4305进程将命令交给root,然后产生4306子进程来执行

原文:http://www.cnblogs.com/codingforum/p/5835999.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!