Friday, August 12, 2005

tcsh startup tasks

tcsh startup tasks
All 4 messages in topic - view as tree

What exactly does tcsh do after completing processing of .cshrc? I have
a delay of 3 to 5 seconds every time I login to my Solaris account,
which uses /bin/tcsh as my login shell.

I added the line

echo "LEAVING .cshrc"

as the last line of .cshrc. This print statement is printed very
quickly after I login. Thus, the problem does not lie withing .cshrc.

Also, only *after* the 3-5 sec delay is over do I enter .login (because
I added an echo command as the first line of that file). Hence, I'm
interested in whatever occurs after .cshrc but before .login.

I do not have a .tchsrc file, and /etc/csh.cshrc and /etc/csh.login do
not exist.

Reply

The Solaris 8 man page sais

If the shell is a login shell, this is the sequence of invo-
cations: First, commands in /etc/.login are executed. Next,
commands from the .cshrc file your home directory are exe-
cuted. Then the shell executes commands from the .login file
in your home directory; the same permission checks as those
for .cshrc are applied to this file.
and
If you start csh as a login shell and you do not have a
.login in your home directory, then the csh reads in the
/etc/.login.

The 1st statement is true, and IMHO the 2nd is wrong.
Anyway there should be nothing between .cshrc and .login.

You can test the tcsh login as follows:

mkdir tmp
cd tmp
ln -s /bin/tcsh ./-tcsh
env PATH=${PATH}:. -tcsh

And replace the latter by

truss ...

--
Michael Tosch @ hp : com

Reply

Try setting the ECHO and the VERBOSE variables inside your .tcshrc
setenv echo
setenv verbose

Use lowercase! and make sure to do setenv, not just set. You want these
variables to carry on into further processes.
These will show you every command executed.

Reply

I found the culprit - an 8MB .history file! Removed that file and not
only do logins speed up, but also logouts were affected as well.

-Bob
Andover, MA

0 Comments:

Post a Comment

<< Home