Path: utzoo!attcan!uunet!mcvax!hp4nl!botter!star.cs.vu.nl!maart From: maart@cs.vu.nl (Maarten Litmaath) Newsgroups: comp.unix.questions Subject: Re: Login shell? Message-ID: <1636@solo3.cs.vu.nl> Date: 8 Nov 88 17:00:53 GMT References: <3ed799bc.103e8@hi-csc.UUCP> <13851@mimsy.UUCP> <511@imec.UUCP> <25721@bu-cs.BU.EDU> <10791@ulysses.homer.nj.att.com> <1217@vsedev.VSE.COM> <1623@solo10.cs.vu.nl> <1230@vsedev.VSE.COM> Reply-To: maart@cs.vu.nl (Maarten Litmaath) Organization: VU Informatica, Amsterdam Lines: 31 In article <1230@vsedev.VSE.COM> logan@vsedev.VSE.COM (James Logan III) writes: \In article <1623@solo10.cs.vu.nl> maart@cs.vu.nl (Maarten Litmaath) writes: \>In article <1217@vsedev.VSE.COM> logan@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 \>\ \>\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@cs.vu.nl, mcvax!botter!maart