How to decide whether a process is running in the background

Matthias Ernst maer at curie.nmr.lpc.ethz.ch
Tue Nov 28 19:58:16 AEST 1989


I recently wrote a program which automatically lowers the priority of
processes with long computing times. The program monitors all active
processes and sends a renice signal to non system processes when a given
amount of cpu time is used. Some users on our network tend to start so
many jobs at the same time on one machine, that it becomes difficult to
work interactively. Therefore I want to limit the number of background
processes every user is allowed to start. This can be done very easily by
sending a SIGSTOP signal to every background process exceeding this
number.  The only problem is how to decide, whether a program is running
in the background or whether it is an interactive process like a shell or
an editor.

Is there any possibility to get this information about a process under 
SunOS4.x (or in generall under BSD 4.2) ?

Please mail any reply to 		maer at nmr.lpc.ethz.ch
(or if you can't reach this address 	maer at czheth5a.bitnet)

Thanks
Matthias Ernst, ETH-Zuerich, CH-8092 Zuerich



More information about the Comp.sys.sun mailing list