Bug #79564 [PATCH]: poll() cannot be interrupted

From: Date: Tue, 26 May 2020 20:47:02 +0000
Subject: Bug #79564 [PATCH]: poll() cannot be interrupted
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-227188@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79564&edit=1 ID: 79564 Patch added by: nikic@php.net Reported by: nikic@php.net Summary: poll() cannot be interrupted Status: Open Type: Bug Package: Streams related PHP Version: master-Git-2020-05-04 (Git) Block user comment: N Private report: N New Comment: 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 Previous Comments: ------------------------------------------------------------------------ [2020-05-04 07:58:28] 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. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=79564&edit=1

« previous php.bugs (#227188) next »