summaryrefslogtreecommitdiffstats
path: root/etc/inc/util.inc
diff options
context:
space:
mode:
authorthompsa <andy@fud.org.nz>2010-03-12 13:18:09 +1300
committerthompsa <andy@fud.org.nz>2010-03-12 13:18:09 +1300
commitcae1b7db89f7cc46fb611701e8d261054903a3ad (patch)
treea9f1aee243de37efc9a3658ca01221dbcb362d54 /etc/inc/util.inc
parenta3db8d75dd68362341d408c5369057eb22e869e2 (diff)
downloadpfsense-cae1b7db89f7cc46fb611701e8d261054903a3ad.zip
pfsense-cae1b7db89f7cc46fb611701e8d261054903a3ad.tar.gz
'\b' is not the word boundary on BSD, its actually '[[:<:]]' and '[[:>:]]',
change these functions to use better syntax and not grep at all.
Diffstat (limited to 'etc/inc/util.inc')
-rw-r--r--etc/inc/util.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index 9bae752..686810f 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -50,7 +50,7 @@ function isvalidpid($pid) {
}
function is_process_running($process) {
- $running = (trim(shell_exec("ps axwu | grep '\b{$process}\b' | grep -v 'grep'")) != '');
+ $running = (shell_exec("pgrep -x {$process}") != '');
return $running;
}
OpenPOWER on IntegriCloud