As you seem to understand, shell built-in functions such as echo are processed by the running shell and therefore do not require a new process to be started in the foreground (normally).
However, if you send them to the background, they need to be controlled by a distinct shell and will consequently start a new shell process with the command in question. This should be fairly easy to observe in bash as sending a process in the background will show the new process id next to the job number such as:
$ echo 'hi' &
[1] 19536
hi
In this case, process 19536 is a new bash instance.
Recent Questions...
ما را در سایت Recent Questions دنبال میکنید
برچسب:
نویسنده: استخدام کار
بازدید: 356
تاريخ: چهارشنبه
30 تير
1395 ساعت: 13:32