[PHP-DEV] implementing posix_setrlimit

2001-10-02 Thread John Donagher


Hello-

We are planning on implementing posix_setrlimit() as a sister function to
posix_getrlimit() to:
a) protect against runaway/buggy programs from bringing the server down and 
b) to allow a program that genuinely requires a lot of CPU time and/or memory
   to ask for it (by modifying its soft limit all the way up to an
   administrator-imposed hard limit) 

Is there any particular reason than this has not already been implemented, and
if not, would it be a valid contribution to the PHP language?

Thanks
John

-- 

John Donagher
Application Engineer, Intacct Corp.

Public key available off http://www.keyserver.net
Key fingerprint = 4024 DF50 56EE 19A3 258A  D628 22DE AD56 EEBE 8DDD


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] implementing posix_setrlimit

2001-10-02 Thread Jason Greene

John,

I would guess that the reason it was never implemented was due to the 
problems this could pose as a webserver module. If you would like to
submit your patch, make sure you limit the function to the CGI SAPI.
(or you can just send the patch and someone can add that)

-Jason
- Original Message - 
From: John Donagher [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, October 02, 2001 3:27 PM
Subject: [PHP-DEV] implementing posix_setrlimit


 
 Hello-
 
 We are planning on implementing posix_setrlimit() as a sister function to
 posix_getrlimit() to:
 a) protect against runaway/buggy programs from bringing the server down and 
 b) to allow a program that genuinely requires a lot of CPU time and/or memory
to ask for it (by modifying its soft limit all the way up to an
administrator-imposed hard limit) 
 
 Is there any particular reason than this has not already been implemented, and
 if not, would it be a valid contribution to the PHP language?
 
 Thanks
 John
 
 -- 
 
 John Donagher
 Application Engineer, Intacct Corp.
 
 Public key available off http://www.keyserver.net
 Key fingerprint = 4024 DF50 56EE 19A3 258A  D628 22DE AD56 EEBE 8DDD
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] implementing posix_setrlimit

2001-10-02 Thread John Donagher


Hi Jason-

We haven't yet implemented it nor have we looked in depth at the possible
intricacies of an implementation .. but from a high level we think it does make
sense even then, since this is a system call that any UNIX process should be
able to utilize. In any event, it only makes sense for us in an ISAPI context,
as that is the context in which our application runs.

There was a thread a few years ago about a possible setrlimit() implementation,
but it was deferred since there is an option for setting some process
limitations at the webserver level .. unfortunately those aren't enough for us.

Thanks
John

On Tue, 2 Oct 2001, Jason Greene wrote:

 John,
 
 I would guess that the reason it was never implemented was due to the 
 problems this could pose as a webserver module. If you would like to
 submit your patch, make sure you limit the function to the CGI SAPI.
 (or you can just send the patch and someone can add that)
 
 -Jason
 - Original Message - 
 From: John Donagher [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Tuesday, October 02, 2001 3:27 PM
 Subject: [PHP-DEV] implementing posix_setrlimit
 
 
  
  Hello-
  
  We are planning on implementing posix_setrlimit() as a sister function to
  posix_getrlimit() to:
  a) protect against runaway/buggy programs from bringing the server down and 
  b) to allow a program that genuinely requires a lot of CPU time and/or memory
 to ask for it (by modifying its soft limit all the way up to an
 administrator-imposed hard limit) 
  
  Is there any particular reason than this has not already been implemented, and
  if not, would it be a valid contribution to the PHP language?
  
  Thanks
  John
  
  -- 
  
  John Donagher
  Application Engineer, Intacct Corp.
  
  Public key available off http://www.keyserver.net
  Key fingerprint = 4024 DF50 56EE 19A3 258A  D628 22DE AD56 EEBE 8DDD
  
  
  -- 
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
  
 
 

-- 

John Donagher
Application Engineer, Intacct Corp.

Public key available off http://www.keyserver.net
Key fingerprint = 4024 DF50 56EE 19A3 258A  D628 22DE AD56 EEBE 8DDD


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]