Bug #69607 [NEW]: curl_multi_select returns -1 for error or non error condition.

From: Date: Fri, 08 May 2015 17:10:55 +0000
Subject: Bug #69607 [NEW]: curl_multi_select returns -1 for error or non error condition.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-192589@lists.php.net to get a copy of this message
From:             daniel dot pitts at cbsinteractive dot com
Operating system: All
PHP version:      Irrelevant
Package:          cURL related
Bug Type:         Bug
Bug description:curl_multi_select returns -1 for error or non error condition.

Description:
------------
curl_multi_select returns -1 for error or non error condition.

If the underlying 'curl_multi_fdset' sets the max_fd to -1,
curl_multi_select returns -1.  That isn't an error condition, but a
'please call curl_multi_perform soon' signal.  

If the underlying call to 'select' returns error (-1), then it is an
error condition. Unfortunately there is no way from the PHP code to find
out if select reported an error, or if the multi_fdset reported max_fd =
-1.  

It would be useful if curl_multi_select at least set some value
somewhere that would let us know that the select failed, preferably with
info from errno.

  $result = curl_multi_select($cmh);
  if ($result === -1) {
     $err = curl_multi_select_last_error($cmh); // missing this
function.
     if ($err) {
        throw new \Exception($err);
     }
  }




-- 
Edit bug report at https://bugs.php.net/bug.php?id=69607&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=69607&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=69607&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=69607&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=69607&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=69607&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=69607&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=69607&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=69607&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=69607&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=69607&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=69607&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=69607&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=69607&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69607&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=69607&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=69607&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=69607&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69607&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=69607&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=69607&r=mysqlcfg



Thread (3 messages)

« previous php.bugs (#192589) next »