php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79564 poll() cannot be interrupted
Submitted: 2020-05-04 07:58 UTC Modified: -
From: nikic@php.net Assigned:
Status: Open Package: Streams related
PHP Version: master-Git-2020-05-04 (Git) OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: nikic@php.net
New email:
PHP Version: OS:

 

 [2020-05-04 07:58 UTC] nikic@php.net
Description:
------------
https://github.com/php/php-src/blob/342754575237da912874f781a24eefe76434ce5a/main/streams/xp_socket.c#L144 performs an unlimited loop on EINTR during polling. This means that it's not possible to interrupt the process using Ctrl+C.

To reproduce, run php -S localhost:8000 on

if (!empty($_GET['self'])) {
    echo 'content';
} else {
    echo file_get_contents('http://localhost:8000?self=1');
}

try to access http://localhost:8000/ and then try to exit the built-in server.


Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-05-26 20:47 UTC] nikic@php.net
The following pull request has been associated:

Patch Name: Don't continue polling on EINTR
On GitHub:  https://github.com/php/php-src/pull/5521
Patch:      https://github.com/php/php-src/pull/5521.patch
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 05:01:32 2024 UTC