1
0
Fork 0

add helper.c

This commit is contained in:
illiliti 2020-08-18 12:28:22 +03:00
parent b17173163f
commit b53bb9eb82
2 changed files with 64 additions and 1 deletions

View file

@ -266,7 +266,7 @@ struct udev_monitor *udev_monitor_new_from_netlink(struct udev *udev, const char
return NULL;
}
if (inotify_add_watch(udev_monitor->ifd, UDEV_MONITOR_DIR, IN_CLOSE_WRITE) == -1) {
if (inotify_add_watch(udev_monitor->ifd, UDEV_MONITOR_DIR, IN_CLOSE_WRITE | IN_EXCL_UNLINK) == -1) {
close(udev_monitor->ifd);
close(udev_monitor->efd);
free(udev_monitor);