fd 0 is a valid fd - although if we get stdin as our inotify fd, something
is weird somewhere. For the dbus-daemon, in practice this should never
happen, because we use _dbus_ensure_standard_fds() to make sure stdin
is already open. For unit tests, it could in theory be the case that
stdin is closed.
Signed-off-by: Simon McVittie <smcv@collabora.com>
#else
inotify_fd = inotify_init ();
#endif
- if (inotify_fd <= 0)
+ if (inotify_fd < 0)
{
_dbus_warn ("Cannot initialize inotify");
goto out;