Login shell?
Maarten Litmaath
maart at cs.vu.nl
Wed Nov 9 03:00:53 AEST 1988
In article <1230 at vsedev.VSE.COM> logan at vsedev.VSE.COM (James Logan III) writes:
\In article <1623 at solo10.cs.vu.nl> maart at cs.vu.nl (Maarten Litmaath) writes:
\>In article <1217 at vsedev.VSE.COM> logan at vsedev.VSE.COM (James Logan III) writes:
\>\... If you just want to find out what if the current
\>\shell is indeed the shell spawned by init(1M) (via getty(1M), login(1)),
\>\then just write a simple C program like this:
\>\--------
\>\#include <stdio.h>
\>\
\>\main()
\>\{
\>\ if (getppid() == getpgrp())
\>\ exit(0);
\>\ exit(1);
\>\}
\...
\>2)
\> This scheme won't work for rsh/rlogin.
\
\It works just fine for rlogin, thank you. I just tested it on my
\system.
\
\Since you don't have a true session with rsh it will indicate
\correctly that the program running is not your login shell.
When I do an rsh, I want my environment set too on the remote machine,
thank you. Effectively it IS a loginshell (rLOGIN, see?).
Are you suggesting every setenv, stty, etc. should get placed in .cshrc?
--
George Bush: |Maarten Litmaath @ VU Amsterdam:
Capt. Slip of the Tongue |maart at cs.vu.nl, mcvax!botter!maart
More information about the Comp.unix.questions
mailing list