[PHP-DEV] Bug #11592: need for an a SIGALRM based timeout mecanism From: thomas.morin <email protected>
Date: 06/20/01

From: thomas.morin <email protected>
Operating system: irrelevant
PHP version: 4.0.5
PHP Bug Type: Feature/Change Request
Bug description: need for an a SIGALRM based timeout mecanism

As mentionned in #9676, in #8595 and in comments in the set_time_limit function online manual page, set_time_limit seems to be not suitable to solve some problems like :

 - fopen on a url for which the distant server is not responding
 
 - exec an external program which hangs

 - trying to resolve some DNS name

 - sleep()

 - etc.

The "better" solution I've read was a suggestion to use SOAP or XML-RPC to wrap such requests... this would be like using a hammer to kill a fly... :)

It would be _great_ to have a mecanism (based on an alarm signal or similar for instance) to be able to define a timeout on all low-level functions (or at least some of them like fopen, fsockopen, exec, gethostby...).

Such a missing feature can be a show stopper one for people needing to retrieve data from an (unreliable?) external datafeed for instance.

-- 
Edit Bug report at: http://bugs.php.net/?id=11592&edit=1

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>