mirror of
https://gitlab.com/niansa/inotifyrun.git
synced 2025-03-06 20:48:32 +01:00
Cleanup and submodule update
This commit is contained in:
parent
b5f4f559b8
commit
5d08a62062
4 changed files with 5 additions and 4 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
inotifyrun
|
BIN
a.out
BIN
a.out
Binary file not shown.
|
@ -34,13 +34,13 @@ int main(int argc, char **argv) {
|
|||
inotifier = inotify_init()
|
||||
);
|
||||
// Get array of files and commands
|
||||
libcatch_retry = 0;
|
||||
libcatch_behavior = 0;
|
||||
struct fcmd_pair *assocs = (struct fcmd_pair *)(argv + 1);
|
||||
struct fcmdwatcher_pair *assocs_watches = malloc((sizeof(struct fcmdwatcher_pair) * ((argc - 1) / 2)) + 1);
|
||||
struct fcmdwatcher_pair *watcherpair_ptr;
|
||||
CATCH(assocs_watches = malloc((sizeof(struct fcmdwatcher_pair) * ((argc - 1) / 2)) + 1));
|
||||
// Initlialise inotify further while checking if all files are actual files
|
||||
libcatch_retry = 2;
|
||||
libcatch_behavior = 2;
|
||||
for (struct fcmd_pair *thispair = assocs; *(char**)thispair; thispair++) {
|
||||
// Check if file is an actual file
|
||||
struct stat fname_stat;
|
||||
|
@ -57,7 +57,7 @@ int main(int argc, char **argv) {
|
|||
);
|
||||
}
|
||||
// Wait for events to occur
|
||||
libcatch_retry = 1;
|
||||
libcatch_behavior = 1;
|
||||
struct inotify_event thisevent;
|
||||
while (1) {
|
||||
// Read new event
|
||||
|
|
2
libcatch
2
libcatch
|
@ -1 +1 @@
|
|||
Subproject commit 4a7f680d19963b35c0688aa3dcf2ec4f06940ff9
|
||||
Subproject commit db86a25c192661de3c8dc06d354a5bc281ac7c23
|
Loading…
Add table
Reference in a new issue