home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!tcsi.com!iat.holonet.net!news.cerf.net!usc!howland.reston.ans.net!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!usenet.coe.montana.edu!news.u.washington.edu!phylo.genetics.washington.edu!zeno
- From: zeno@phylo.genetics.washington.edu (Sean Lamont)
- Newsgroups: comp.sys.next.software
- Subject: Re: How can a program check to see if user is on console?
- Date: 27 Jan 1993 00:55:56 GMT
- Organization: University of Washington, Seattle
- Lines: 20
- Message-ID: <1k4misINNnke@shelley.u.washington.edu>
- References: <7466@ucsbcsl.ucsb.edu>
- NNTP-Posting-Host: phylo.genetics.washington.edu
-
- 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?
- >
- >Thanks in advance.
-
- I don't know if this is the easiest, but you can read the user/tty pairs
- from /etc/utmp.
-
-
-
-
- --
- Sean T. Lamont | "Don't oppress me, It's
- zeno@genetics.washington.edu | 'computer of color!' "
- lamont@abstractsoft.com |_______________________________
- Abstract Software
-