From 3ec86b451e36756748c3587b4246a8f00182cb29 Mon Sep 17 00:00:00 2001 From: Louwrentius Date: Sun, 18 Jul 2010 09:42:29 +0000 Subject: [PATCH] Fixed inotify mechanism. --- ppss | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ppss b/ppss index 9151b41..8152934 100755 --- a/ppss +++ b/ppss @@ -77,7 +77,7 @@ PROCESSORS="" START_KEY="$RANDOM$RANDOM$RANDOM" KILL_KEY="$RANDOM$RANDOM$RANDOM" # This is a signal to stop immediately and kill QUEUE="" -INOTIFY=0 +INOTIFY="" RECURSION="1" # all running processes. START_PPSS="" STOP_PPSS="" @@ -452,7 +452,7 @@ is_var_empty () { detect_inotify () { - if [ -e /usr/bin/inotifywait ] + if [ -e /usr/bin/inotifywait ] && [ ! "$INOTIFY" = "0" ] then INOTIFY=1 fi @@ -542,6 +542,10 @@ process_arguments () { MAX_DELAY="$2" add_var_to_config MAX_DELAY "$MAX_DELAY" shift 2 ;; + --disable-inotify) + INOTIFY=0 + add_var_to_config INOTIFY "$INOTIFY" + shift 1 ;; --daemon) DAEMON="1" QUIET="1"