Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: logout from interactive subshell



(I'm not sure why you copied bug-bash, but I've dropped it.)

On Oct 12, 12:20pm, Com MN PG P E B Consultant 3 wrote:
}
} > Is it a subshell or a second-level shell? (In the first case, $$ and
} > $PPID remain the same.)
} 
} Could you kindly explain the difference?

A subshell is a shell started with the "( ... )" construct or by
backgrounding a complex command such as a shell function or loop.
It's a shell that has been fork'd, but not exec'd.

A second-level shell is:

} a process (being the current shell, or cleartool, or whatever)
} is doing a fork, followed by an exec of the new shell.

The term "subshell" is often colloquially used to refer to both, but
they really aren't the same thing.



Messages sorted by: Reverse Date, Date, Thread, Author