From 220be89f5c6150ccbde4f4273b5aa69153634916 Mon Sep 17 00:00:00 2001 From: Jason Stephens Date: Tue, 30 Jun 2020 09:19:23 -0500 Subject: [PATCH] [Process] Fix Permission Denied error when writing sf_proc_00 lock files on Windows --- src/Symfony/Component/Process/Pipes/WindowsPipes.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Symfony/Component/Process/Pipes/WindowsPipes.php b/src/Symfony/Component/Process/Pipes/WindowsPipes.php index 302b0509a8..8973f58bee 100644 --- a/src/Symfony/Component/Process/Pipes/WindowsPipes.php +++ b/src/Symfony/Component/Process/Pipes/WindowsPipes.php @@ -56,6 +56,9 @@ class WindowsPipes extends AbstractPipes $file = sprintf('%s\\sf_proc_%02X.%s', $tmpDir, $i, $name); if (!$h = fopen($file.'.lock', 'w')) { + if (file_exists($file.'.lock')) { + continue 2; + } restore_error_handler(); throw new RuntimeException('A temporary file could not be opened to write the process output: '.$lastError); }