You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug #19428 [Process] Fix write access check for pipes on Windows (nicolas-grekas)
This PR was merged into the 2.7 branch.
Discussion
----------
[Process] Fix write access check for pipes on Windows
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19336, #19416
| License | MIT
| Doc PR | -
Commits
-------
66e694e [Process] Fix write access check for pipes on Windows
Copy file name to clipboardExpand all lines: src/Symfony/Component/Process/Pipes/WindowsPipes.php
+10-7Lines changed: 10 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -52,27 +52,30 @@ public function __construct($disableOutput, $input)
52
52
Process::STDERR => Process::ERR,
53
53
);
54
54
$tmpDir = sys_get_temp_dir();
55
-
if (!@fopen($file = $tmpDir.'\\sf_proc_00.check', 'wb')) {
56
-
thrownewRuntimeException('A temporary file could not be opened to write the process output to, verify that your TEMP environment variable is writable');
57
-
}
58
-
@unlink($file);
55
+
$error = 'unknown reason';
56
+
set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; });
0 commit comments