Skip to content

Commit

Permalink
feat(falco): monitor events with more types for rules directory
Browse files Browse the repository at this point in the history
Signed-off-by: Nitro Cao <jaycecao520@gmail.com>
  • Loading branch information
NitroCao authored and poiana committed Dec 12, 2023
1 parent 47959ab commit 4bfc42e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions userspace/falco/app/restart_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ bool falco::app::restart_handler::start(std::string& err)

for (const auto& f : m_watched_files)
{
auto wd = inotify_add_watch(m_inotify_fd, f.c_str(), IN_CLOSE_WRITE);
auto wd = inotify_add_watch(m_inotify_fd, f.c_str(), IN_CLOSE_WRITE | IN_MOVE_SELF | IN_DELETE_SELF);
if (wd < 0)
{
err = "could not watch file: " + f;
Expand All @@ -71,7 +71,7 @@ bool falco::app::restart_handler::start(std::string& err)

for (const auto &f : m_watched_dirs)
{
auto wd = inotify_add_watch(m_inotify_fd, f.c_str(), IN_CREATE | IN_DELETE);
auto wd = inotify_add_watch(m_inotify_fd, f.c_str(), IN_CREATE | IN_DELETE | IN_MOVE);
if (wd < 0)
{
err = "could not watch directory: " + f;
Expand Down

0 comments on commit 4bfc42e

Please sign in to comment.