home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / misc / 4118 < prev    next >
Encoding:
Internet Message Format  |  1992-11-11  |  1.2 KB

  1. Xref: sparky comp.unix.misc:4118 comp.unix.questions:13267 comp.sys.sgi:16321 comp.graphics:11779
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!sgigate!odin!fido!fudge.asd.sgi.com!karlton
  3. From: karlton@fudge.asd.sgi.com (Phil Karlton)
  4. Newsgroups: comp.unix.misc,comp.unix.questions,comp.sys.sgi,comp.graphics
  5. Subject: Re: Interactive vs Background users
  6. Date: 12 Nov 1992 04:46:15 GMT
  7. Organization: Silicon Graphics, Inc., Mountain View, CA
  8. Lines: 20
  9. Distribution: world
  10. Message-ID: <1dsninINN2ur@fido.asd.sgi.com>
  11. References: <1dsh2fINNeok@manuel.anu.edu.au>
  12. NNTP-Posting-Host: fudge.asd.sgi.com
  13.  
  14. One way to do this is to run a watcher program that sends the
  15. background process a SIGSTOP when it detects activity on any
  16. tty and a SIGCONT when the tty's haven't been accessed for 10
  17. minutes. Something on the order of
  18.     killall -SIGSTOP gauss
  19. should do the trick.
  20.  
  21. In an sh script, something like
  22.     foo="'ls -lu /dev/tty | sum'"
  23. will have a different result if the user has typed into a
  24. shell. Unfortunately, the access time for /dev/mouse and
  25. /dev/keyboard are not updated when the corresponding devices
  26. are used.
  27.  
  28. PK
  29. -- 
  30. --
  31. Phil Karlton                Silicon Graphics Computer Systems
  32. Curmudgeon                2011 N. Shoreline Blvd.
  33.                     Mountain View, CA  94039-7311
  34.