From: utzoo!decvax!ucbvax!CAD:tektronix!tekmdp!laurir
Newsgroups: net.unix-wizards
Title: How does csh(1) know it's not a login shell?
Article-I.D.: tekmdp.1849
Posted: Sun Mar 20 10:41:48 1983
Received: Wed Mar 23 07:01:12 1983

  We have a situation in which we need to convince a new instance of csh
that it's a login shell.  We do this by setting argv[0] = "-csh" in
the execv() which invokes csh.  Sure enough, it executes the commands
in .login, but an attempt to execute the "login" command gets
"not a login shell" (or something similar).
  How does it know?  This is at a binary license site, so I can't
examine the source code.

  -- Andrew Klossner (decvax!tektronix!tekmdp!laurir)