aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-11-14 21:52:16 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-11-14 21:52:16 +0000
commit289ff0e3411543446f40cfa45db606431a4657e1 (patch)
tree5353a8698e9e5c1dc47f2fd85928dd83aa27b640
parentb0e5d42d4f3245cb6d7511fc03a09adb82c09783 (diff)
downloadbusybox-w32-289ff0e3411543446f40cfa45db606431a4657e1.tar.gz
busybox-w32-289ff0e3411543446f40cfa45db606431a4657e1.tar.bz2
busybox-w32-289ff0e3411543446f40cfa45db606431a4657e1.zip
inotify: document waiting behavior
-rw-r--r--include/usage.h9
-rw-r--r--miscutils/inotifyd.c2
2 files changed, 6 insertions, 5 deletions
diff --git a/include/usage.h b/include/usage.h
index 9f7358906..69d37f923 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -1840,14 +1840,15 @@
1840#define inotifyd_trivial_usage \ 1840#define inotifyd_trivial_usage \
1841 "/user/space/agent dir/or/file/being/watched[:mask] ..." 1841 "/user/space/agent dir/or/file/being/watched[:mask] ..."
1842#define inotifyd_full_usage "\n\n" \ 1842#define inotifyd_full_usage "\n\n" \
1843 "Spawn userspace agent on filesystem changes." \ 1843 "Run userspace agent on filesystem changes." \
1844 "\nWhen a filesystem event matching the mask occurs" \ 1844 "\nWhen a filesystem event matching the mask occurs" \
1845 "\non specified file/directory an userspace agent is spawned" \ 1845 "\non specified file /user/space/agent is run" \
1846 "\nwith the parameters:" \ 1846 "\nwith the parameters:" \
1847 "\n1. actual event(s)" \ 1847 "\n1. actual event(s)" \
1848 "\n2. file/directory name" \ 1848 "\n2. file name" \
1849 "\n3. name of subfile (if any), in case of watching a directory" \ 1849 "\n3. name of subfile (if any), in case of watching a directory" \
1850 "\n" \ 1850 "\ninotify waits for agent to exit." \
1851 "\nEvents:" \
1851 "\n a File is accessed" \ 1852 "\n a File is accessed" \
1852 "\n c File is modified" \ 1853 "\n c File is modified" \
1853 "\n e Metadata changed" \ 1854 "\n e Metadata changed" \
diff --git a/miscutils/inotifyd.c b/miscutils/inotifyd.c
index 0c4b06784..216a69654 100644
--- a/miscutils/inotifyd.c
+++ b/miscutils/inotifyd.c
@@ -103,7 +103,7 @@ int inotifyd_main(int argc UNUSED_PARAM, char **argv)
103 if (bb_got_signal) 103 if (bb_got_signal)
104 break; 104 break;
105 n = poll(&pfd, 1, -1); 105 n = poll(&pfd, 1, -1);
106 /* Signal interrupted us? */ 106 // Signal interrupted us?
107 if (n < 0 && errno == EINTR) 107 if (n < 0 && errno == EINTR)
108 goto again; 108 goto again;
109 // Under Linux, above if() is not necessary. 109 // Under Linux, above if() is not necessary.