Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 25e1818

Browse files
committedFeb 26, 2022
Fixed occasional proc_close() PHP CGI hang issue.
1 parent c32cff9 commit 25e1818

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎server.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
// PHP App Server.
3-
// (C) 2021 CubicleSoft. All Rights Reserved.
3+
// (C) 2019 CubicleSoft. All Rights Reserved.
44

55
if (!isset($_SERVER["argc"]) || !$_SERVER["argc"])
66
{
@@ -225,6 +225,7 @@ protected function HandleResponseCompleted($id, $result)
225225
{
226226
foreach ($client->appdata["cgi"]["pipes"] as $fp) fclose($fp);
227227

228+
proc_terminate($client->appdata["cgi"]["proc"]);
228229
proc_close($client->appdata["cgi"]["proc"]);
229230

230231
if (trim($client->appdata["cgi"]["stderr"]) !== "")

0 commit comments

Comments
 (0)
Please sign in to comment.