[Process] Fix #5594 : `termsig` must be used instead of `stopsig` in exceptions when a process is signaled
This commit is contained in:
parent
9abcf4f81b
commit
8757ad45a8
|
@ -398,7 +398,10 @@ class Process
|
|||
}
|
||||
$this->updateStatus();
|
||||
if ($this->processInformation['signaled']) {
|
||||
throw new \RuntimeException(sprintf('The process stopped because of a "%s" signal.', $this->processInformation['stopsig']));
|
||||
if ($this->isSigchildEnabled()) {
|
||||
throw new RuntimeException('The process has been signaled.');
|
||||
}
|
||||
throw new RuntimeException(sprintf('The process has been signaled with signal "%s".', $this->processInformation['termsig']));
|
||||
}
|
||||
|
||||
$time = 0;
|
||||
|
@ -410,7 +413,10 @@ class Process
|
|||
$exitcode = proc_close($this->process);
|
||||
|
||||
if ($this->processInformation['signaled']) {
|
||||
throw new \RuntimeException(sprintf('The process stopped because of a "%s" signal.', $this->processInformation['stopsig']));
|
||||
if ($this->isSigchildEnabled()) {
|
||||
throw new RuntimeException('The process has been signaled.');
|
||||
}
|
||||
throw new RuntimeException(sprintf('The process has been signaled with signal "%s".', $this->processInformation['termsig']));
|
||||
}
|
||||
|
||||
$this->exitcode = $this->processInformation['running'] ? $exitcode : $this->processInformation['exitcode'];
|
||||
|
|
Reference in New Issue