diff options
author | June McEnroe <june@causal.agency> | 2018-04-08 12:53:26 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2018-04-08 12:53:26 -0400 |
commit | 7c88364f61728b67cc4b5ec1cce310fc6b8d5cf7 (patch) | |
tree | 09024255f5a13712c0bfcab32b9a1329780aa22b | |
parent | Commit with june@causal.agency (diff) | |
download | src-7c88364f61728b67cc4b5ec1cce310fc6b8d5cf7.tar.gz src-7c88364f61728b67cc4b5ec1cce310fc6b8d5cf7.zip |
Sleep in watch when a file is deleted
Reopening the path immediately would always fail. Wait a second for the file to hopefully reappear.
Diffstat (limited to '')
-rw-r--r-- | bin/watch.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/watch.c b/bin/watch.c index 442835fa..f33c9ee7 100644 --- a/bin/watch.c +++ b/bin/watch.c @@ -85,6 +85,7 @@ int main(int argc, char *argv[]) { if (event.fflags & NOTE_DELETE) { close(event.ident); + sleep(1); watch(kq, event.udata); } |