CommandReader: Use stream_isatty() instead of posix_isatty() (new in 7.2)

This commit is contained in:
Dylan K. Taylor 2018-05-18 16:46:13 +01:00
parent f08537a1e0
commit b75413e3c4

View File

@ -96,7 +96,7 @@ class CommandReader extends Thread{
* @return bool
*/
private function isPipe($stream) : bool{
return is_resource($stream) and ((function_exists("posix_isatty") and !posix_isatty($stream)) or ((fstat($stream)["mode"] & 0170000) === 0010000));
return is_resource($stream) and (!stream_isatty($stream) or ((fstat($stream)["mode"] & 0170000) === 0010000));
}
/**