bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

logout from interactive subshell


From: Com MN PG P E B Consultant 3
Subject: logout from interactive subshell
Date: Thu, 12 Oct 2006 10:47:38 +0200

Does someone know how to deal with the following situation?

Very often I do the following pattern:

   (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.

Is it possible to automate this in such a way that I have to type only
one
command, to leave all subshells (in this case, only 1, but in general, I
might be several subshells deep) AND then logout?

One idea would be to use ps, locate the process to the current subshell,
crawling upwards via the PPIDs to find the PID of the login shell, and
kill
it. But this seems to be such an awkward solution, that I thought maybe
there is an easier way to do it.

(Note: This posting goes to the bash and to the zsh mailing list,
because this problem
might be solved differently in both shells, and I'm interested in both
solutions - of
course a solution working in bash AND zsh would be preferable).

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]