From 694fa611ef75711f8af00e41f6317a27393bf977 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 12 Sep 2022 20:49:04 -0600 Subject: [PATCH] Check to see if posix_getsid exists --- app/fax_queue/resources/service/fax_queue.php | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/app/fax_queue/resources/service/fax_queue.php b/app/fax_queue/resources/service/fax_queue.php index 03d952349e..7ad3a8321a 100644 --- a/app/fax_queue/resources/service/fax_queue.php +++ b/app/fax_queue/resources/service/fax_queue.php @@ -58,13 +58,25 @@ //check to see if the process is running if (file_exists($file)) { $pid = file_get_contents($file); - if (posix_getsid($pid) === false) { - //process is not running - $exists = false; + if (function_exists('posix_getsid')) { + if (posix_getsid($pid) === false) { + //process is not running + $exists = false; + } + else { + //process is running + $exists = true; + } } else { - //process is running - $exists = true; + if (file_exists('/proc/'.$pid)) { + //process is running + $exists = true; + } + else { + //process is not running + $exists = false; + } } }