home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / next / software / 3660 < prev    next >
Encoding:
Text File  |  1993-01-28  |  1.1 KB  |  28 lines

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