From c9951a3bac349f86d7c5ad9d839bbd1410771bf5 Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Fri, 22 May 2009 12:48:10 -0600 Subject: [PATCH] Better checking for cases when inotify doesn't work. --- src/conky.c | 2 +- src/llua.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conky.c b/src/conky.c index c21b2c6b..8d37cdb8 100644 --- a/src/conky.c +++ b/src/conky.c @@ -6733,7 +6733,7 @@ static void main_loop(void) break; } #ifdef HAVE_SYS_INOTIFY_H - if (!inotify_config_wd) { + if (inotify_fd && !inotify_config_wd) { inotify_config_wd = inotify_add_watch(inotify_fd, current_config, IN_MODIFY); diff --git a/src/llua.c b/src/llua.c index e31c9d20..8b941e5c 100644 --- a/src/llua.c +++ b/src/llua.c @@ -48,7 +48,7 @@ void llua_load(const char *script) ERR("llua_load: %s", lua_tostring(lua_L, -1)); lua_pop(lua_L, 1); #ifdef HAVE_SYS_INOTIFY_H - } else if (!llua_block_notify) { + } else if (!llua_block_notify && inotify_fd) { llua_append_notify(script); #endif /* HAVE_SYS_INOTIFY_H */ }