Re: Scope of set_time_limit

From: Date: Mon, 15 Jan 2001 23:44:55 +0000
Subject: Re: Scope of set_time_limit
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-44187@lists.php.net to get a copy of this message
Zeev Suraski wrote: > BTW, offhand, I'm not sure that it's really not working. The time limit > should still be imposed (at least under UNIX, not under Windows). However, > the executed program will go on running. I did a very basic test: <?php set_time_limit (1); print exec ('for file in ls -R /; do echo $file; done'); for ($x=0; $x < 1000000; ++$x) ; echo "Foo!"; ?> The script runs, exiting with this message: /var/yp/binding Fatal error: Maximum execution time of 1 second exceeded in /home/zak/public_html/stl.php on line 6 It looks like the time limit does not apply to the executed program... --zak > > Zeev > > At 07:17 15/1/2001, Zak Greant wrote: > >A recent note added to the manual errata pointed out the > >set_time_limit does not affect system commands that have > >been executed by PHP. > > > >I would guess that attempting to limit system behavior in > >this way is beyond the scope of set_time_limit. > > > >Any opinions or options on this issue? My feeling is that > >we document that set_time_limit is not a safe way to limit > >the resource usage of commands run via calls to exec, etc... > > > >--zak > > > > > > > >-- > >PHP Development Mailing List <http://www.php.net/> > >To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > >For additional commands, e-mail: php-dev-help@lists.php.net > >To contact the list administrators, e-mail: php-list-admin@lists.php.net > > -- > Zeev Suraski <zeev@zend.com> > CTO & co-founder, Zend Technologies Ltd. > http://www.zend.com/ > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > For additional commands, e-mail: php-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.dev (#44187) next »