Exceed session is dying

Exceed session is dying

Post by Ali Moula » Thu, 08 May 2003 21:29:31



Hi,

We are using Exceed to open sessions (xterm) on our Unix machines.
The user(s) default shell is tcsh. The same profile is used to log on
all Unix boxes.
For a particular Unix box I want to run bash instead of tcsh (I don't
want to change /etc/passwrd because bash is only installed on one
particular station).

In .tcshrc there is a line that will execute bash if we are on machine
X.

if (`hostname` == "xxxxx") then
    /usr/local/bin/bash
endif

I have noticed that if I simply do that my xterm dies after around 5
seconds (see case 2).
If I change the line by adding exec (exec /usr/local/bin/bash)
everything is OK (see case 3), same goes if the line (#
/usr/local/bin/bash) is not executed (see case 1).

I took some snaps with ps and would like to understand why the xterm
session is dying (what is the difference between executing bash with and
without exec from a system point of view ?) after a while in Case 2 (is
it related to session or process group managment ?, where can I fing
more info on the topic ?).

Case 1:
# Vesrion with empty .tcshrc
Early stage :
 F S      UID   PID  PPID  PGID   SID  TTY    CMD
 8 S     root   196     1   196   196  ?      /usr/sbin/inetd -s
 8 S     root 25295   196 25295 25295  ?      in.rlogind
 8 S   user33 25299 25295 25299 25299  pts/8  -tcsh
 8 S   user33 25313 25299 25313 25299  pts/8  xterm -display yyyy
 8 S   user33 25314 25313 25314 25314  pts/7  tcsh

After a while :
 8 S   user33 25313     1 25313 25299  ?      xterm -display yyyy
 8 S   user33 25314 25313 25314 25314  pts/7  tcsh

Case 2:
# Version with bash started from .tcshrc (without exec)
Early stage :
 F S      UID   PID  PPID  PGID   SID  TTY     CMD
 8 S     root   196     1   196   196  ?       /usr/sbin/inetd -s
 8 S     root 25469   196 25469 25469  ?       in.rlogind
 8 S   user33 25474 25469 25474 25474  pts/8   -tcsh
 8 S   user33 25486 25474 25486 25474  pts/8   /usr/local/bin/bash
 8 S   user33 25487 25486 25487 25474  pts/8   xterm -display yyyy
 8 S   user33 25488 25487 25488 25488  pts/7   tcsh
 8 S   user33 25498 25488 25498 25488  pts/7   /usr/local/bin/bash

After a while :
Nothing (the xterm has been killed).

Case 3:
# Version with bash started from .tcshrc (exec)
Early stage:
 F S      UID   PID  PPID  PGID   SID  TTY     CMD
 8 S     root   196     1   196   196  ?       /usr/sbin/inetd -s
 8 S     root 25521   196 25521 25521  ?       in.rlogind
 8 S   user33 25525 25521 25525 25525  pts/8   /usr/local/bin/bash
 8 S   user33 25538 25525 25538 25525  pts/8   xterm -display yyyy
 8 S   user33 25539 25538 25539 25539  pts/7   /usr/local/bin/bash

After a while:
 8 S   user33 25538     1 25538 25525  ?       xterm -display yyyy
 8 S   user33 25539 25538 25539 25539  pts/7   /usr/local/bin/bash

Thanks.

--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG