Lines 1-4
Link Here
|
1 |
--- src/inotifywatch.c.orig 2015-11-08 15:17:11 UTC |
1 |
--- src/inotifywatch.c.orig 2015-11-02 17:01:50 UTC |
2 |
+++ src/inotifywatch.c |
2 |
+++ src/inotifywatch.c |
3 |
@@ -12,6 +12,7 @@ |
3 |
@@ -12,6 +12,7 @@ |
4 |
#include <errno.h> |
4 |
#include <errno.h> |
Lines 8-22
Link Here
|
8 |
#include <regex.h> |
8 |
#include <regex.h> |
9 |
#include <signal.h> |
9 |
#include <signal.h> |
10 |
#include <stdbool.h> |
10 |
#include <stdbool.h> |
11 |
@@ -91,6 +92,7 @@ int main(int argc, char ** argv) |
11 |
@@ -93,6 +94,7 @@ int main(int argc, char ** argv) |
12 |
done = false; |
12 |
char * exc_iregex = NULL; |
13 |
char * regex = NULL; |
13 |
char * inc_regex = NULL; |
14 |
char * iregex = NULL; |
14 |
char * inc_iregex = NULL; |
15 |
+ sigset_t set, oset; |
15 |
+ sigset_t set, oset; |
16 |
|
16 |
|
17 |
signal( SIGINT, handle_impatient_user ); |
17 |
signal( SIGINT, handle_impatient_user ); |
18 |
|
18 |
|
19 |
@@ -109,6 +111,16 @@ int main(int argc, char ** argv) |
19 |
@@ -121,11 +123,23 @@ int main(int argc, char ** argv) |
20 |
return EXIT_FAILURE; |
20 |
return EXIT_FAILURE; |
21 |
} |
21 |
} |
22 |
|
22 |
|
Lines 31-39
Link Here
|
31 |
+ pthread_sigmask(SIG_BLOCK, &set, &oset); |
31 |
+ pthread_sigmask(SIG_BLOCK, &set, &oset); |
32 |
+ |
32 |
+ |
33 |
if ( !inotifytools_initialize() ) { |
33 |
if ( !inotifytools_initialize() ) { |
34 |
fprintf(stderr, "Couldn't initialize inotify. Are you running Linux " |
34 |
warn_inotify_init_error(); |
35 |
"2.6.13 or later, and was the\n" |
|
|
36 |
@@ -120,6 +132,8 @@ int main(int argc, char ** argv) |
37 |
return EXIT_FAILURE; |
35 |
return EXIT_FAILURE; |
38 |
} |
36 |
} |
39 |
|
37 |
|
Lines 42-53
Link Here
|
42 |
// Attempt to watch file |
40 |
// Attempt to watch file |
43 |
// If events is still 0, make it all events. |
41 |
// If events is still 0, make it all events. |
44 |
if ( !events ) |
42 |
if ( !events ) |
45 |
@@ -195,7 +209,7 @@ int main(int argc, char ** argv) |
|
|
46 |
char * moved_from = 0; |
47 |
|
48 |
do { |
49 |
- event = inotifytools_next_event( 0 ); |
50 |
+ event = inotifytools_next_event( -1 ); |
51 |
if ( !event ) { |
52 |
if ( !inotifytools_error() ) { |
53 |
return EXIT_TIMEOUT; |
54 |
- |