Path: utzoo!attcan!uunet!lll-winken!ames!mailrus!uflorida!haven!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.unix.wizards Subject: Re: script & lock Keywords: getlogin(3) Message-ID: <15428@mimsy.UUCP> Date: 12 Jan 89 13:57:07 GMT References: <17972@adm.BRL.MIL> <596@cf-cm.UUCP> <15399@mimsy.UUCP> <6925@june.cs.washington.edu> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 18 In article <6925@june.cs.washington.edu> ka@june.cs.washington.edu (Kenneth Almquist) writes: >The source may be the final reference, but there's no law against looking >things up in the manual. (I like that line; shall have to use it myself someday...) > If getlogin is called within a process that is not attached to > a terminal or if there is no entry in /etc/utmp for the process's > terminal, getlogin returns a NULL pointer (0). The key phrase is `if there is no entry in /etc/utmp'. An entry with utmp.ut_name[0]=='\0' is considered `no entry'. Bad wording in the manual, to say the least. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris