You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// last exit code is output on the fourth pipe and caught to work around --enable-sigchild
302
300
$descriptors[3] = array('pipe', 'w');
303
301
@@ -666,12 +664,12 @@ public function clearErrorOutput()
666
664
*
667
665
* @return null|int The exit status code, null if the Process is not terminated
668
666
*
669
-
* @throws RuntimeException In case --enable-sigchild is activated and the sigchild compatibility mode is disabled
667
+
* @throws RuntimeException In case --enable-sigchild is activated
670
668
*/
671
669
publicfunctiongetExitCode()
672
670
{
673
-
if (!$this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) {
674
-
thrownewRuntimeException('This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method.');
671
+
if ($this->isSigchildEnabled()) {
672
+
thrownewRuntimeException('This PHP has been compiled with --enable-sigchild.');
675
673
}
676
674
677
675
$this->updateStatus(false);
@@ -723,7 +721,7 @@ public function hasBeenSignaled()
723
721
{
724
722
$this->requireProcessIsTerminated(__FUNCTION__);
725
723
726
-
if (!$this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) {
724
+
if ($this->isSigchildEnabled()) {
727
725
thrownewRuntimeException('This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved.');
728
726
}
729
727
@@ -744,7 +742,7 @@ public function getTermSignal()
744
742
{
745
743
$this->requireProcessIsTerminated(__FUNCTION__);
746
744
747
-
if ($this->isSigchildEnabled() && (!$this->enhanceSigchildCompatibility || -1 === $this->processInformation['termsig'])) {
745
+
if ($this->isSigchildEnabled() && -1 === $this->processInformation['termsig']) {
748
746
thrownewRuntimeException('This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved.');
749
747
}
750
748
@@ -1153,42 +1151,6 @@ public function setInput($input)
1153
1151
return$this;
1154
1152
}
1155
1153
1156
-
/**
1157
-
* Returns whether sigchild compatibility mode is activated or not.
1158
-
*
1159
-
* @return bool
1160
-
*
1161
-
* @deprecated since version 3.3, to be removed in 4.0. Sigchild compatibility will always be enabled.
1162
-
*/
1163
-
publicfunctiongetEnhanceSigchildCompatibility()
1164
-
{
1165
-
@trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0. Sigchild compatibility will always be enabled.', __METHOD__), E_USER_DEPRECATED);
1166
-
1167
-
return$this->enhanceSigchildCompatibility;
1168
-
}
1169
-
1170
-
/**
1171
-
* Activates sigchild compatibility mode.
1172
-
*
1173
-
* Sigchild compatibility mode is required to get the exit code and
1174
-
* determine the success of a process when PHP has been compiled with
1175
-
* the --enable-sigchild option
1176
-
*
1177
-
* @param bool $enhance
1178
-
*
1179
-
* @return self The current Process instance
1180
-
*
1181
-
* @deprecated since version 3.3, to be removed in 4.0.
@trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0. Sigchild compatibility will always be enabled.', __METHOD__), E_USER_DEPRECATED);
if (false !== $enhance = getenv('ENHANCE_SIGCHLD')) {
1491
-
try {
1492
-
$process->setEnhanceSigchildCompatibility(false);
1493
-
$process->getExitCode();
1494
-
$this->fail('ENHANCE_SIGCHLD must be used together with a sigchild-enabled PHP.');
1495
-
} catch (RuntimeException$e) {
1496
-
$this->assertSame('This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method.', $e->getMessage());
0 commit comments