Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!bbn!ulowell!arosen@hawk.ulowell.edu From: arosen@hawk.ulowell.edu (MFHorn) Newsgroups: comp.unix.wizards Subject: Re: timing child processes Message-ID: <12712@swan.ulowell.edu> Date: 8 Apr 89 20:52:12 GMT References: <6250@homxc.ATT.COM> Sender: news@swan.ulowell.edu Distribution: usa Lines: 15 From article <6250@homxc.ATT.COM>, by vas1@homxc.ATT.COM (S.PUTCHA): > Is there an easy way to kill a process after it uses up a certain > amount of CPU time (Note: NOT REAL time)? You could use the setrlimit system call. Setrlimit is passed a pointer to an 'rlimit' struct as defined in /usr/include/sys/resource.h . When the process uses whatever CPU time you specify, it gets sent a SIGXCPU. This applies to BSD. I'm not sure about SysV. -- Andy Rosen | arosen@hawk.ulowell.edu | "I got this guitar and I ULowell, Box #3031 | ulowell!arosen | learned how to make it Lowell, Ma 01854 | | talk" -Thunder Road RD in '88 - The way it should've been