Skip to content

Commit b5e2cf5

Browse files
committed
Avoid blocking pipes on Windows
1 parent cc8c392 commit b5e2cf5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/curl/tests/curl_setopt_ssl.phpt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ $port = 14430;
6060

6161
// set up local server
6262
$cmd = "openssl s_server -key $serverKeyPath -cert $serverCertPath -accept $port -www -CAfile $clientCertPath -verify_return_error -Verify 1";
63-
$process = proc_open($cmd, [["pipe", "r"], ["pipe", "w"], ["pipe", "w"]], $pipes);
63+
$type = PHP_OS_FAMILY !== "Windows" ? "pipe" : "socket";
64+
$process = proc_open($cmd, [[$type, "r"], [$type, "w"], [$type, "w"]], $pipes);
6465

6566
if ($process === false) {
6667
die('failed to start server');

0 commit comments

Comments
 (0)