Req #11592 [Fbk->NoF]: need for an a SIGALRM based timeout mecanism

From: Date: Sun, 29 Jan 2017 04:22:29 +0000
Subject: Req #11592 [Fbk->NoF]: need for an a SIGALRM based timeout mecanism
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-207000@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=11592&edit=1 ID: 11592 Updated by: php-bugs@lists.php.net Reported by: thomas dot morin at webmotion dot com Summary: need for an a SIGALRM based timeout mecanism -Status: Feedback +Status: No Feedback Type: Feature/Change Request Package: *General Issues Operating System: * PHP Version: * Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. Previous Comments: ------------------------------------------------------------------------ [2017-01-20 17:05:57] heiglandreas@php.net Is this still relevant? ------------------------------------------------------------------------ [2001-06-20 23:14:58] rasmus@php.net The problem is that at least with Apache we cannot use SIGALRM as Apache has taken that. When PHP is running as an embedded module in a web server, messing with the signals is usally a no-no. If you can come up with some way of doing this cleanly without signals, please speak up. And by the way, fsockopen() has a timeout parameter. ------------------------------------------------------------------------ [2001-06-20 17:12:15] thomas dot morin at webmotion dot com 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 this bug report at https://bugs.php.net/bug.php?id=11592&edit=1

« previous php.bugs (#207000) next »