[Process] Fix Permission Denied error when writing sf_proc_00 lock files on Windows

This commit is contained in:
Jason Stephens 2020-06-30 09:19:23 -05:00 committed by Nicolas Grekas
parent 801f4cd7ac
commit 220be89f5c
1 changed files with 3 additions and 0 deletions

View File

@ -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);
}