|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-06-10 19:42 UTC] casper at langemeijer dot eu
[2012-06-13 18:55 UTC] langemeijer@php.net
-Assigned To:
+Assigned To: langemeijer
[2012-06-19 18:13 UTC] langemeijer@php.net
[2012-06-19 18:24 UTC] langemeijer@php.net
-Status: Assigned
+Status: Closed
[2012-06-19 18:24 UTC] langemeijer@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 14:00:01 2025 UTC |
Description: ------------ stream_set_timeout() doesn't seem to work on a blocking ssh2_exec() stream. Reproduce code: --------------- $con=ssh2_connect('ssss', 22); ssh2_auth_password($con, "xxx", "yyy"); $exec = ssh2_exec($con, '/path/to/application'); $a = microtime(TRUE); stream_set_blocking($exec, TRUE); stream_set_timeout($exec, 1); $buffer = trim(fgets($exec)); if (empty($buffer)) { $buffer = "EMPTY"; } echo "Result: $buffer in " . round((microtime(TRUE) - $a)*1000, 1) . "ms"; Expected result: ---------------- EMPTY after ~ sec Actual result: -------------- Example code will stall >1 sec if the executable executes a sleep(10);