in reply to Re: use less 'CPU'
in thread use less 'CPU'

No, BSD::Resource and setrlimit don't allow to control max CPU load. They allow only control max cpu time. I.e. with my feature script may run forever, but never take more than 40% CPU. With setrlimit (or ulimit in bash) you can limit script to 5 CPU minutes and after script reach this limit kernel will kill it.

Replies are listed 'Best First'.
Re: Re: Re: use less 'CPU'
by Fletch (Bishop) on Feb 13, 2003 at 20:26 UTC

    The default SIGXCPU handler dies, but there's nothing stopping you from installing your own handler which does something different (sleeps, alters what's running, sets a different limit).