Better checking for cases when inotify doesn't work.
authorBrenden Matthews <brenden@rty.ca>
Fri, 22 May 2009 18:48:10 +0000 (12:48 -0600)
committerBrenden Matthews <brenden@rty.ca>
Fri, 22 May 2009 18:48:46 +0000 (12:48 -0600)
src/conky.c
src/llua.c

index c21b2c6..8d37cdb 100644 (file)
@@ -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);
index e31c9d2..8b941e5 100644 (file)
@@ -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 */
        }