pyrmont / watchful Goto Github PK
View Code? Open in Web Editor NEWA simple C library for file watching
License: MIT License
A simple C library for file watching
License: MIT License
Janet 1.17 deprecates the old thread interface, meaning watchful fails to compile:
In file included from src/watchful/fse.c:1:
src/watchful/../watchful.h:77:3: error: unknown type name 'JanetThread'
77 | JanetThread *parent;
| ^~~~~~~~~~~
src/watchful/inotify.c: In function 'handle_event':
src/watchful/inotify.c:98:9: warning: implicit declaration of function 'janet_thread_send' [-Wimplicit-function-declaration]
98 | janet_thread_send(stream->parent, janet_wrap_pointer(event), 10);
| ^~~~~~~~~~~~~~~~~
src/watchful.c: In function 'cfun_watch':
src/watchful.c:350:25: warning: implicit declaration of function 'janet_thread_receive' [-Wimplicit-function-declaration]
350 | int timed_out = janet_thread_receive(&out, timeout);
| ^~~~~~~~~~~~~~~~~~~~
In file included from src/watchful/inotify.c:1:
src/watchful/../watchful.h:77:3: error: unknown type name 'JanetThread'
77 | JanetThread *parent;
| ^~~~~~~~~~~
src/watchful/inotify.c: In function 'handle_event':
src/watchful/inotify.c:98:9: warning: implicit declaration of function 'janet_thread_send' [-Wimplicit-function-declaration]
98 | janet_thread_send(stream->parent, janet_wrap_pointer(event), 10);
| ^~~~~~~~~~~~~~~~~
In file included from src/watchful.c:1:
src/watchful.h:77:3: error: unknown type name 'JanetThread'
77 | JanetThread *parent;
| ^~~~~~~~~~~
src/watchful.c:94:8: error: unknown type name 'JanetThread'
94 | static JanetThread *watchful_current_thread() {
| ^~~~~~~~~~~
src/watchful.c: In function 'watchful_current_thread':
src/watchful.c:96:13: error: 'JanetThread' undeclared (first use in this function); did you mean 'JanetStream'?
96 | return (JanetThread *)janet_unwrap_abstract(cfun(0, NULL));
| ^~~~~~~~~~~
| JanetStream
src/watchful.c:96:13: note: each undeclared identifier is reported only once for each function it appears in
src/watchful.c:96:26: error: expected expression before ')' token
96 | return (JanetThread *)janet_unwrap_abstract(cfun(0, NULL));
| ^
src/watchful.c: In function 'cfun_watch':
src/watchful.c:350:25: warning: implicit declaration of function 'janet_thread_receive' [-Wimplicit-function-declaration]
350 | int timed_out = janet_thread_receive(&out, timeout);
| ^~~~~~~~~~~~~~~~~~~~
It might be a lot of work to rewrite this...
When I have a directory which contains another directory for which I have neither write nor read permission, watchful/watch fails with the following error message:
free(): double free detected in tcache 2
Tested on Arch Linux.
In some cases it is more convenient to watch multiple single files instead of the whole directory with some complex exclusions
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.