Login shell?
Maarten Litmaath
maart at cs.vu.nl
Sat Nov 5 01:13:51 AEST 1988
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);
\}
1)
Why #include <stdio.h>?
2)
This scheme won't work for rsh/rlogin.
--
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