home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.next.software
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!elroy.jpl.nasa.gov!swrinde!gatech!hubcap!ncrcae!ncrhub2!ncrgw2!psinntp!cubetech.com!imladris!andrew
- From: andrew@cubetech.com (Andrew Loewenstern)
- Subject: Re: How can a program check to see if user is on console?
- Message-ID: <1993Jan26.190016.5811@cubetech.com>
- Organization: Cube Technologies, Inc.
- References: <7466@ucsbcsl.ucsb.edu>
- Date: Tue, 26 Jan 1993 19:00:16 GMT
- Lines: 17
-
- In article <7466@ucsbcsl.ucsb.edu> doug@foxtrot.ccmrc.ucsb.edu (Douglas Scott) writes:
- >I am writing some C code which needs to check to see if the user is logged
- >onto the console (i.e., any tty, as long as the user is sitting at the
- >console).
- >
- >What is the easiest way to check to see if this is true?
-
- Reading the /etc/utmp file is the easiest way. Check the utmp man
- page for the format.
-
-
- andrew
- --
- andrew@cubetech.com | "We cannot dwell in the time that is to come,
- Andrew Loewenstern | lest we lose our now for a phantom of our
- Cube Technologies, Inc. | own design." - Erendis FYEO Public Key:
- 0000000701B61D1ADF0DFC9C16185CEA055200000007EB4A9FEB1922065D471A89E905B5
-