Closed retrogradeorbit closed 7 years ago
This was introduced in #18, ping @5HT @liveforeverx
It looks like you can try mitigating this by setting backwards_compatible
to false
: https://github.com/synrc/fs/blob/master/src/fs_app.erl
@5HT any reason to keep backwards compatibility?
for me no, maybe we should ask Elixir developers
@retrogradeorbit : Set backwards_compatible
to false
to disable this behaviour (as @proger suggests).
When I fs:start_link(fs_watcher, "/path/to/my/dir"), the inotify command is set up to watch that path "/path/to/my/dir", but also the current working directory the application was started in is also watched. This leads to the application crashing if the user starts it in a directory too close to root, with too many child directories, as it causes too many paths to be watched and that exceeds the value set in /proc/sys/fs/inotify/max_user_watches.
A classic example of this is if the application is setup as a system process under something like upstart. Here, the cwd is usually the root path "/", and then the application crashes with: