-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Remove unused code from Process #52399
Conversation
I don't know this particular part of the code but usually this kind of comparison |
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.
Ok, this condition is actually checked in the previous if
.
@@ -322,7 +320,7 @@ public function start(callable $callback = null, array $env = []) | |||
|
|||
if ('\\' === \DIRECTORY_SEPARATOR) { | |||
$commandline = $this->prepareWindowsCommandLine($commandline, $env); | |||
} elseif (!$this->useFileHandles && $this->isSigchildEnabled()) { | |||
} elseif ($this->isSigchildEnabled()) { |
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.
} elseif ($this->isSigchildEnabled()) { | |
} elseif ('\\' !== \DIRECTORY_SEPARATOR && $this->isSigchildEnabled()) { |
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.
The elseif
will only be considered if if ('\\' === \DIRECTORY_SEPARATOR)
(2 lines before) doesn't hit. Basically it will be checked twice but vice versa, as suggested change. 🤔
bca20f0
to
7a5eba2
Compare
Thank you @ausi. |
While trying to work on #43162 (comment) I noticed that the private member
useFileHandles
is not used for anything anymore.It is always set in the constructor to
'\\' === \DIRECTORY_SEPARATOR
so it basically has a constant value and its only usage is in anelseif
after a check to the very same constant value:if ('\\' === \DIRECTORY_SEPARATOR)
.Therefore this code does nothing and can be removed.