[Linux] Display a warning in AP if inotify fails to initialize

Signed-off-by: Chris Burel <burelc@amazon.com>
This commit is contained in:
Chris Burel
2021-11-15 11:06:32 -08:00
parent 04f4d5e031
commit 7ac5bc3d5c
@@ -34,6 +34,12 @@ struct FolderRootWatch::PlatformImplementation
{
// The CLOEXEC flag prevents the inotify watchers from copying on fork/exec
m_iNotifyHandle = inotify_init1(IN_CLOEXEC);
const auto err = errno;
if (m_iNotifyHandle < 0)
{
AZ_Warning("FileWatcher", false, "Unable to initialize inotify, file monitoring will not be available: %s\n", strerror(err));
}
}
return (m_iNotifyHandle >= 0);
}