conditions for C-Shell to be login shell
Jay Libove
libove at libove.det.dec.com
Thu Sep 6 05:46:32 AEST 1990
Why was the C-Shell (as it exists under Ultrix versions 3.1 and higher,
at least, and probably on other platforms as well) written so that these
two conditions had to be satisfied in order for the shell to be a "login"
shell?
1) the first character of the first argument must be a dash ( '-' )
2) there must be only one argument
Item #1 makes sense, as it gives a way of signalling that a shell should
be a login shell, with an extremely low probability of a login shell being
specified accidentally (as it requires a little playing with arguments to
the exec() functions to get the dash '-' in to argument 0), but...
Item #2 means that only a straight, no other options, interactive c-shell
can be a login shell.
This is a problem in the way that Ultrix systems start up their DECWindows
graphical user interface:
execlp(shell, minus_shell, "-c", window_startup_command)
and since the shell is started with >1 argument, it isn't a login shell,
and therefore the user's ~/.login file never gets read... and all
subsequent applications that start up also don't have the environment
that the user has set up in his/her ~/.login file.
Well, thanks for any/all input!
--
Jay Libove libove at libove.det.dec.com
Digital Equipment Corporation decwrl!libove.det.dec.com!libove
Detroit ACT/Ultrix Resource Center Opinions? They're mine, mine, all mine!
Farmington Hills, Michigan and D.E.C. Can't have 'em!
More information about the Comp.unix.internals
mailing list