[Linux] Avoid duplicating inotify watches in forked AssetBuilder processes (#5683)
The AssetProcessor on Linux uses `inotify` to monitor for file updates. The AssetProcessor also uses a `ProcessWatcher` to launch child AssetBuilder processes. `ProcessWatcher` accomplishes this by calling `fork()`, which duplicates the current process, then calling `exec()`. The `fork()` call also appears to duplicate any inotify fds. This results in the subprocess consuming duplicate inotify watches, which is a limited system resource (Ubunut 20 defaults `/proc/sys/fs/inotify/max_user_watches` to 65536). The AssetProcessor still has issues with this max, but this should free up at least half of the uses. Signed-off-by: Chris Burel <burelc@amazon.com>monroegm-disable-blank-issue-2
parent
823b5bde0b
commit
9f9aa8f2a6
Loading…
Reference in New Issue