[PROCESS] make sure /dev/tty is readable
When using Process from Web-SAPI it is likely that the webserver user doesn't has rights to use /dev/tty
This commit is contained in:
parent
cae6de6f43
commit
935afe650a
@ -792,6 +792,9 @@ class Process
|
|||||||
if ('\\' === DIRECTORY_SEPARATOR && $tty) {
|
if ('\\' === DIRECTORY_SEPARATOR && $tty) {
|
||||||
throw new RuntimeException('TTY mode is not supported on Windows platform.');
|
throw new RuntimeException('TTY mode is not supported on Windows platform.');
|
||||||
}
|
}
|
||||||
|
if ($tty && (!file_exists('/dev/tty') || !is_readable('/dev/tty'))) {
|
||||||
|
throw new RuntimeException('TTY mode requires /dev/tty to be readable.');
|
||||||
|
}
|
||||||
|
|
||||||
$this->tty = (bool) $tty;
|
$this->tty = (bool) $tty;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user