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