posix_setrlimit (patch attached)

php.internals

Marcin Gibuła

22 years ago
Hi, this patch adds posix_setrlimit function (in posix extension), which can be useful in standalone apps to lower your resources limits (for example cpu limit). Example usage is: <?php $a = array('cpu' => array('1', '3')); posix_setrlimit($a); ?> Could you review it and consider to apply if it's ok?
-- mg

Derick Rethans

22 years ago
On Tue, 24 Aug 2004, Marcin [iso-8859-2] Gibu?a wrote:
> Hi, > this patch adds posix_setrlimit function (in posix extension), which can be > useful in standalone apps to lower your resources limits (for example cpu > limit). > > Example usage is: > <?php > $a = array('cpu' => array('1', '3')); > posix_setrlimit($a); > ?> > > Could you review it and consider to apply if it's ok?
I browser through it and it seems you put it in the HAVE_GETRLIMIT define, you might want to add a new config/m4 check for it and use HAVE_SETRLIMIT around it. Conceptually I see no reason why we should not add it. Derick
-- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org

Marcin Gibuła

22 years ago
> I browser through it and it seems you put it in the HAVE_GETRLIMIT > define, you might want to add a new config/m4 check for it and use > HAVE_SETRLIMIT around it. Conceptually I see no reason why we should not > add it.
Here is updated patch.
-- mg