为了运行ps,bash 会分叉,创建一个新进程;新进程通过使用执行,使其本身得以重生,转化为 ps的一个新的实例。
To run ps, bash forks to create a new process; the new process reincarnates itself using execution, turning into a new instance of ps.
而且,这两个脚本都要小心地使用exec外壳命令,这个命令用一个程序替代另一个程序,但是没有创建新进程。
Also, both scripts are careful to use the exec shell command, which replaces one program with another but does not create new processes.
而且,这两个脚本都要小心地使用exec外壳命令,这个命令用一个程序替代另一个程序,但是没有创建新进程。
Also, both scripts are careful to use the exec shell command, which replaces one program with another but does not create new processes.
应用推荐