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 | b774d67ea16b81420a7b62ba210b1f1c5ae6aae7 (patch) | |
tree | ecd0ba4e003561d35c6ec13643911657ab5e2dd1 /bin | |
parent | Commit with june@causal.agency (diff) | |
download | src-b774d67ea16b81420a7b62ba210b1f1c5ae6aae7.tar.gz src-b774d67ea16b81420a7b62ba210b1f1c5ae6aae7.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 ed499652..9b83410f 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); } |