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

RE: logout from interactive subshell



> >    (1) rlogin to a foreign host
> >    (2) Invoke a subshell (for example because I'm setting a 
> Clearcase
> > View)
> >    (3) Logout from the host
> > 
> > Step (3) needs two steps: First I have to type 'exit' to leave the
> > subshell, and then either 'exit' or 'logout' to leave the 
> login shell.
> 
> On step (2) you use 
> 
> exec bash
> 
> instead of just bash.

This does not work in the general case since I don't know at the time of
invoking
bash, whether I will eventually just go back one level or logout
completely. 
Imagine the following situation:

  rlogin foo
  VAR=val1
  exec bash
  VAR=val2

Now if at this point I would decide to not logout, but just go up one
level (in order
to have the old value of VAR restored), there is no way to do it -
typing exit would
log me out *unconditionally*.

Ronald
-- 
Ronald Fischer (phone +49-89-63676431)
mailto:mn-pg-p-e-b-consultant-3.com@xxxxxxxxxxx



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