diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index c4546b41e9..dcef32a02f 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -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'];