From a00020f23db93616691e35dd3a78a0c6ab5361ba Mon Sep 17 00:00:00 2001 From: WebCD Date: Thu, 17 Dec 2015 13:22:11 +0100 Subject: [PATCH] Using stty --version for exist check --- src/PhpSerial.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhpSerial.php b/src/PhpSerial.php index 1d253d5..0a6f6ce 100644 --- a/src/PhpSerial.php +++ b/src/PhpSerial.php @@ -47,7 +47,7 @@ public function PhpSerial() if (substr($sysName, 0, 5) === "Linux") { $this->_os = "linux"; - if ($this->_exec("stty") === 0) { + if ($this->_exec("stty --version") === 0) { register_shutdown_function(array($this, "deviceClose")); } else { trigger_error(