Lượng Tiger
New member
Which command replaces current shell with command that is being executed?
Answer
Whenever we run any command in a Bash shell, a subshell is created by default, and a new child process is spawned (forked) to execute the command. When using
exec
, however, the command following exec replaces the current shell. This means no subshell is created and the current process is replaced with this new command.
Answer
Whenever we run any command in a Bash shell, a subshell is created by default, and a new child process is spawned (forked) to execute the command. When using
exec
, however, the command following exec replaces the current shell. This means no subshell is created and the current process is replaced with this new command.