Quantcast
Channel: CodeSection,代码区,Linux操作系统:Ubuntu_Centos_Debian - CodeSec
Viewing all articles
Browse latest Browse all 11063

shell中的fork、source和exec总结(包括环境变量)

$
0
0

摘要:对fork,source和exec三种方式执行shell脚本的总结。

准备知识

1.我们所执行的任何程序,都是由父进程(parent process)所产生出来的一个子进程(child process),子进程在结束后,将返回到父进程去。此一现像在linux系统中被称为 fork。当子进程被产生的时候,将会从父进程那里获得一定的资源分配、及(更重要的是)继承父进程的环境


Viewing all articles
Browse latest Browse all 11063

Trending Articles