|
|
看到一个英文教材上的一段话,原文如下:
The shell initiates the execution, submits arguments, and waits until they are done before displaying a new prompt.
This is what happens when executing a simple command like echo:
[devid@nittedal david]$ echo "hello"
hello
The shell(bash) reads the line echo "hello" and parses the echo command from the argument. Themn the following happens:
1.The process is divided into two exact copies.
2.The parent process waits for the child to terminate.
2.The child swaps the old program (bash for the new command(echo "hello")).
4.The child executes the program.
5.The child terminates.
6.The parent process goes on and you get your shell prompt back.
The process is divided into two identical copies. In order that a process copies itself, the fork function call must be started. After fork, you have two processes: one parent process and one child process. The difference between them is their PID number. The two processes share open files, and each process knows that there is a parent/child relationship to the other.
请问,在1里面,process是指bash 还是指?
请问,在后面process复制了自己,这里的process还是bash,如果这样的话,bash的效率不是太低了?
是不是process是指别的什么?
真的很困惑,请大家帮助,谢谢。 |
|