protected function doRunCommand(Command
$command, InputInterface
$input, OutputInterface
$output) { foreach ($command->
getHelperSet() as $helper) { if ($helper instanceof InputAwareInterface
) { $helper->
setInput($input);
} } $commandSignals =
$command instanceof SignalableCommandInterface ?
$command->
getSubscribedSignals() :
[];
if ($commandSignals ||
$this->dispatcher &&
$this->signalsToDispatchEvent
) { if (!
$this->signalRegistry
) { throw new RuntimeException('Unable to subscribe to signal events. Make sure that the "pcntl" extension is installed and that "pcntl_*" functions are not disabled by your php.ini\'s "disable_functions" directive.'
);
} if (Terminal::
hasSttyAvailable()) { $sttyMode =
shell_exec('stty -g'
);
foreach ([\SIGINT, \SIGTERM
] as $signal) { $this->signalRegistry->
register($signal,
static fn () =>
shell_exec('stty '.
$sttyMode));
} }