# posix_setrlimit (patch attached)

- Thread: https://externals.io/message/12333
- Original archive: https://news-web.php.net/php.internals/12333
- Started by mg@iceni.pl on 2004-08-24T18:56:45+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #12333 — mg@iceni.pl — 2004-08-24T18:56:45+00:00

URL: https://externals.io/message/12333#12333

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

---

## #12334 — Derick Rethans — 2004-08-24T20:32:36+00:00

URL: https://externals.io/message/12333#12334 · In reply to: #12333

> 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

---

## #12335 — mg@iceni.pl — 2004-08-24T20:46:32+00:00

URL: https://externals.io/message/12333#12335 · In reply to: #12334

> 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
