Bug #11592: need for an a SIGALRM based timeout mecanism
| From: | thomas dot morin at webmotion dot com | Date: | Wed, 20 Jun 2001 21:12:15 +0000 |
| Subject: | Bug #11592: need for an a SIGALRM based timeout mecanism | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-57466@lists.php.net to get a copy of this message | ||
From: thomas.morin@webmotion.com
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