Is your feature request related to a problem? Please describe.
We're encountering an infinite loop when running Drush commands on remote site aliases when using Drall: jigarius/drall#77
Describe the solution you'd like
The culprit is this line in Symfony\Component\Process\Process::wait():
$running = '\\' === \DIRECTORY_SEPARATOR ? $this->isRunning() : $this->processPipes->areOpen();
The issue was identified and a solution was suggested in 2020 here: symfony/symfony#21580
To prevent waiting for this upstream change, I propose overriding the checkTimeout() method in SiteProcess:
public function checkTimeout()
{
$this->updateStatus(false);
parent::checkTimeout();
}
This function is called in the problematic part of the wait() method. updateStatus()is the method that isRunning() uses to determine if the process is still running or not.
Describe alternatives you've considered
-
I tried to find a way to modify Drush's injected services, so we can change process.manager to return a class that extends SiteProcess with the code change above. Ideally, this would be done via a command-line option that could be added by Drall.
-
readPipes() would be an even better fit, but it's private. 😞
Is your feature request related to a problem? Please describe.
We're encountering an infinite loop when running Drush commands on remote site aliases when using Drall: jigarius/drall#77
Describe the solution you'd like
The culprit is this line in
Symfony\Component\Process\Process::wait():The issue was identified and a solution was suggested in 2020 here: symfony/symfony#21580
To prevent waiting for this upstream change, I propose overriding the
checkTimeout()method inSiteProcess:This function is called in the problematic part of the
wait()method.updateStatus()is the method thatisRunning()uses to determine if the process is still running or not.Describe alternatives you've considered
I tried to find a way to modify Drush's injected services, so we can change
process.managerto return a class that extendsSiteProcesswith the code change above. Ideally, this would be done via a command-line option that could be added by Drall.readPipes()would be an even better fit, but it's private. 😞