Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.unix.questions Subject: Re: Telling whether the user is at the console Message-ID: <1990Oct02.021539.3843@virtech.uucp> Date: 2 Oct 90 02:15:39 GMT References: <1990Oct1.204707.21038@elroy.jpl.nasa.gov> Reply-To: cpcahil@virtech.UUCP (Conor P. Cahill) Organization: Virtual Technologies Inc., Sterling VA Lines: 12 In article <1990Oct1.204707.21038@elroy.jpl.nasa.gov> pjs@aristotle.jpl.nasa.gov writes: >What's the easiest way to tell from (1) a shell script; (2) a C >program, whether the user process that called either of them was >logged in at the console? I've looked at /etc/utmp, but it seems 1. tty(1) 2. ttyname(3) -- Conor P. Cahill (703)430-9247 Virtual Technologies, Inc., uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160 Sterling, VA 22170