madhuneal / ppss

Automatically exported from code.google.com/p/ppss
0 stars 0 forks source link

recursion doesn't work with inotify and nested directories in daemon mode #46

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. mkdir -p /blah/blah/blah
2. ppss -d /blah -c 'echo ' --daemon 
3. touch a file in /blah [success]
4. touch a file in /blah/blah [failure]
5. touch a file in /blah/blah/blah [failure]

What is the expected output? What do you see instead?

inotify doesn't notify ppss that a new file is in the directory

What version of the product are you using? On what operating system?

ppss-2.85-2
inotify-tools-3.14
CentOS release 5.5

Please provide any additional information below.

looks like the '-r' flag is missing from the invocation of inotifywait.

seems to work fine when not in daemon mode

line 2460

--- /usr/bin/ppss       2011-03-03 14:39:35.000000000 -0500
+++ /tmp/ppss   2011-03-03 14:39:26.000000000 -0500
@@ -2457,7 +2457,7 @@

 inotify_listener () {

-    inotifywait "$SRC_DIR" -m -e close -q --format '%w%f' | \
+    inotifywait "$SRC_DIR" -m -r -e close -q --format '%w%f' | \
     while read -r line
     do
         if [ ! -d "$line" ]

this is a dumb fix, probably needs to honor the --no-recursion flag.

Original issue reported on code.google.com by stick.ol...@gmail.com on 3 Mar 2011 at 7:40

GoogleCodeExporter commented 9 years ago

Original comment by Louwrentius on 16 Mar 2011 at 11:13

GoogleCodeExporter commented 9 years ago
Thanks for the tip and the suggestion to improve this. 

Original comment by Louwrentius on 16 Mar 2011 at 11:30

GoogleCodeExporter commented 9 years ago

Original comment by Louwrentius on 25 Dec 2011 at 4:37