-
-
Notifications
You must be signed in to change notification settings - Fork 166
Fix potential issue with WebWorker #7539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: Martin Auswöger <martin@auswoeger.com>
We could additionally check if the command is executed interactively and if not, not create a |
Feel free to create that PR at Symfony explaining to them that they should not create a |
Right, never mind, I missed that the command is not ours 🤦 |
But the Symfony phpDoc of the
So maybe we should report it there? |
putenv('COLUMNS='.$columnsBefore); | ||
putenv('LINES='.$linesBefore); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There will still be leakage while the command runs. And given that consuming messages can take longer, this is not an optimal solution. Is there really no other way to work around the problem?
Yes, the suppressing any error output likely refers to the Wouldn't private static function readFromProcess(string|array $command): ?string
{
if (!\function_exists('proc_open')) {
return null;
}
$descriptorspec = [
1 => ['pipe', 'w'],
2 => ['pipe', 'w'],
];
$cp = \function_exists('sapi_windows_cp_set') ? sapi_windows_cp_get() : 0;
+
- $process = proc_open($command, $descriptorspec, $pipes, null, null, ['suppress_errors' => true]);
+ $process = @proc_open($command, $descriptorspec, $pipes, null, null, ['suppress_errors' => true]);
if (!\is_resource($process)) {
return null;
}
$info = stream_get_contents($pipes[1]);
fclose($pipes[1]);
fclose($pipes[2]);
proc_close($process);
if ($cp) {
sapi_windows_cp_set($cp);
}
return $info;
} be a better solution within Symfony? // try/catch does not work for warnings here - using |
👍 Würde bei mir auch funktionieren. Mache ich die Änderungen wieder rückgängig stehen sofort wieder die Fehler-Meldungen im Log. |
As symfony/symfony#58332 was merged, do we still need this? |
Nope, we can close :) |
Stacktrace:
See inline comments for the explanation :)