if (!category || streq(category, "seat")) {
k = inotify_add_watch(fd, "/run/systemd/seats/", IN_MOVED_TO|IN_DELETE);
if (k < 0) {
- close_nointr_nofail(fd);
+ safe_close(fd);
return -errno;
}
if (!category || streq(category, "session")) {
k = inotify_add_watch(fd, "/run/systemd/sessions/", IN_MOVED_TO|IN_DELETE);
if (k < 0) {
- close_nointr_nofail(fd);
+ safe_close(fd);
return -errno;
}
if (!category || streq(category, "uid")) {
k = inotify_add_watch(fd, "/run/systemd/users/", IN_MOVED_TO|IN_DELETE);
if (k < 0) {
- close_nointr_nofail(fd);
+ safe_close(fd);
return -errno;
}
if (!category || streq(category, "machine")) {
k = inotify_add_watch(fd, "/run/systemd/machines/", IN_MOVED_TO|IN_DELETE);
if (k < 0) {
- close_nointr_nofail(fd);
+ safe_close(fd);
return -errno;
}