mouse@thunder.mcrcim.mcgill.edu (der Mouse) (02/22/91)
Okay, I have this slab sitting here. Now, I wanted to set up something
involving a "special" login shell. So I start up UserMgr and create a
new user, and point the "shell" field at the special pseudo-shell. But
nothing seems to work.
I eventually reduced the pseudo-shell to the following:
main(ac,av)
int ac;
char **av;
{
write(1,".sh\r\n",5);
execv("/bin/csh",av);
write(1,"exec failed\r\n",15);
}
and I still see the problem.
And what is this problem?
Well, when I su to this account, everything works fine. But when I use
rlogin instead, I get the "Last login" line, I get the output from the
first write() call, and then it hangs. Running ps in another window
reveals that it has execed /bin/csh, which has proceeded to go into an
infinite loop, as far as I can tell: its state is always R and its
cpu-time field is climbing. And - this is particularly interesting -
ps reports that it has no control tty; the TT field is ?. (A slightly
more elaborate pseudo-shell which tries to open /dev/tty shows behavior
consistent with this.) Yet when I go back into UserMgr and set this
login's shell field to /bin/csh, there's no problem: even when I
rlogin, I get a prompt and ps reports that the csh has a control tty.
So, what gives? Anybody have any clue whatsoever?
While I've got your collective ear, a few other gripes I've got....
- Why is it so hostile to multiple uid-0 users? When I create another
user with UID 0 and try to log in as that user, it gives me root's
workspace layout instead of the new user's. (Yes, I understand the
reasons one conventially does not want to do this, and yes, I am
certain I do want to do it - unless there is some other way to
declare a user to be a super-user.)
- How do I get Terminal out of reverse video?
- How can I tell it that I *don't* F-ing *want* the "File Viewer"
window on login? That I want my Terminal (which I have set to start
up automatically) to have initial keyboard focus?
der Mouse
old: mcgill-vision!mouse
new: mouse@larry.mcrcim.mcgill.edu