Fixed documentation
This commit is contained in:
11
README.md
11
README.md
@@ -20,7 +20,7 @@ This command will produce a statically compiled binary called *wolf*.
|
||||
```
|
||||
Wolf - Configurable file watchdog for Linux platform.
|
||||
|
||||
Syntax: './wolf [-c|-d|-m|-r|-w|-p|-f] <PATH ...>'
|
||||
Syntax: './wolf [-c|-d|-m|-r|-w|-p|-f|-e] <PATH ...>'
|
||||
options:
|
||||
-c, --create | Add a watchdog for file creation
|
||||
-d, --delete | Add a watchdog for file deletion
|
||||
@@ -29,6 +29,7 @@ options:
|
||||
-w, --write | Add a watchdog for writing events
|
||||
-p, --permission | Add a watchdog for permissions changes
|
||||
-f, --full | Enable all the previous options
|
||||
-e, --exec | Execute a command when a watchdog detects a change
|
||||
--no-timestamp | Disable timestamp from watchdog output
|
||||
-v, --version | Show program version
|
||||
-h, --help | Show this helper
|
||||
@@ -134,21 +135,21 @@ $> ./wolf -w --exec 'python foo.py'
|
||||
4^2 = 16
|
||||
```
|
||||
|
||||
Be sure to read the _caveats_ section to learn more about the concurrent aspects of this feature and how **Wolf**
|
||||
Be sure to read the _"technical details"_ section to learn more about the concurrent aspects of this feature and how **Wolf**
|
||||
spawns a new process.
|
||||
|
||||
## Technical details
|
||||
Below there is a brief list of the things you should be aware of when using **Wolf**.
|
||||
|
||||
- `inotify` is **NOT** recursive. Meaning that you cannot monitor subdirectories of a watched directory;
|
||||
- `inotify` can only work within files for which you already have reading and writing permissions;
|
||||
- The `-e,--exec` option works by spawning a child process using the `fork(2)` system call; thus, the command is being executed
|
||||
in a new process;
|
||||
- The `-e,--exec` option is a **NON-BLOCKING** feature, meaning that the parent process will continue to log new changes while the
|
||||
child process execute the supplied command; therefore the parent process will **NOT** wait for the child(s) process to terminate;
|
||||
- Since the parent process does not await for the child process to complete it will also not handle its return code, thus the exit
|
||||
status of any supplied command is ignored.
|
||||
- Any `SIGCHLD` signal generated by a child process is ignored, therefore the process reaping of any child is delegated to the kernel;
|
||||
- Any `SIGCHLD` signal generated by a child process is ignored, therefore the reaping of any child process is delegated to the kernel;
|
||||
- `inotify` is **NOT** recursive. Meaning that you cannot monitor subdirectories of a watched directory;
|
||||
- `inotify` can only work within files for which you already have reading and writing permissions;
|
||||
- `inotify` removes deleted files from the `inotify_add_watch(2)`, meaning that, after a file is being deleted, the watchdog associated with it
|
||||
is automatically removed as well. To add it again, the program has to be restarted;
|
||||
- `inotify` is quite verbose by design. For instance if you try to write to a **non-empty** watched file
|
||||
|
||||
Reference in New Issue
Block a user