php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74410 stream_select() is broken on Windows Nanoserver
Submitted: 2017-04-11 07:53 UTC Modified: 2017-04-11 09:01 UTC
From: mattficken@php.net Assigned: mattficken (profile)
Status: Closed Package: Streams related
PHP Version: 7.1.3 OS: Windows Nanoserver
Private report: No CVE-ID: None
 [2017-04-11 07:53 UTC] mattficken@php.net
Description:
------------
stream_select() is broken by recent updates to Nanoserver, the reduced resource edition of Windows Server (Nanoserver supports x64 applications and enough windows APIs that PHP and most applications run on it like any other edition of Windows, just with no GUI).

For standard streams, such as with proc_open from system_with_timeout() function in run-tests.php, stream_select() will return
FALSE immediately regardless of any pending IO on those streams.

Ultimately, this is caused because recently Nanoserver deprecated/stubbed MsgWaitForMultipleObjects(), which is used by php_select() which is used
by PHP on regular Windows and Nanoserver (which only support select() for sockets).




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-11 07:54 UTC] mattficken@php.net
Calling WaitForMultipleObjects() instead of MsgWaitForMultipleObjects() is the solution - so no special action is needed for Nanoserver.

With this patch, stream_selct() still works on regular Windows and works again on Nanoserver. Verified with run-tests.php.
 [2017-04-11 09:00 UTC] mattficken@php.net
Automatic comment on behalf of mattficken
Revision: http://git.php.net/?p=php-src.git;a=commit;h=76c9b584319b75b203c7e1ed7ed82b7bdbe4c442
Log: Fix #74410 by calling WaitForMultipleObjects() instead of MsgWaitForMultipleObjects()
 [2017-04-11 09:00 UTC] mattficken@php.net
-Status: Open +Status: Closed
 [2017-04-11 09:00 UTC] mattficken@php.net
Automatic comment on behalf of mattficken
Revision: http://git.php.net/?p=php-src.git;a=commit;h=d83743739e38c3174be66815d90257856b0e1e07
Log: Fix #74410 by calling WaitForMultipleObjects() instead of MsgWaitForMultipleObjects()
 [2017-04-11 09:01 UTC] mattficken@php.net
-Assigned To: +Assigned To: mattficken
 [2017-04-11 09:01 UTC] mattficken@php.net
Fixed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Oct 14 06:01:27 2024 UTC