if ('\\' !== \DIRECTORY_SEPARATOR
) { // exec is mandatory to deal with sending a signal to the process
$commandline = 'exec '.
$commandline;
} } else { $commandline =
$this->
replacePlaceholders($commandline,
$env);
} if ('\\' === \DIRECTORY_SEPARATOR
) { $commandline =
$this->
prepareWindowsCommandLine($commandline,
$env);
} elseif (!
$this->useFileHandles &&
$this->
isSigchildEnabled()) { // last exit code is output on the fourth pipe and caught to work around --enable-sigchild
$descriptors[3
] =
['pipe', 'w'
];
// See https://unix.stackexchange.com/questions/71205/background-process-pipe-input
$commandline = '{ ('.
$commandline.') <&3 3<&- 3>/dev/null & } 3<&0;';
$commandline .= 'pid=$!; echo $pid >&3; wait $pid 2>/dev/null; code=$?; echo $code >&3; exit $code';
// Workaround for the bug, when PTS functionality is enabled.
// @see : https://bugs.php.net/69442
$ptsWorkaround =
fopen(__FILE__, 'r'
);
}