if (!(m = new0(Manager, 1)))
return NULL;
- m->signal_watch.fd = m->mount_watch.fd = m->epoll_fd = -1;
+ m->signal_watch.fd = m->mount_watch.fd = m->udev_watch.fd = m->epoll_fd = -1;
if (!(m->units = hashmap_new(string_hash_func, string_compare_func)))
goto fail;
if (si.si_code != CLD_EXITED && si.si_code != CLD_KILLED && si.si_code != CLD_DUMPED)
continue;
- log_debug("child %llu died (code=%s, status=%i)", (long long unsigned) si.si_pid, sigchld_code(si.si_code), si.si_status);
+ log_debug("child %llu died (code=%s, status=%i)", (long long unsigned) si.si_pid, sigchld_code_to_string(si.si_code), si.si_status);
if (!(u = hashmap_remove(m->watch_pids, UINT32_TO_PTR(si.si_pid))))
continue;
case WATCH_SIGNAL:
/* An incoming signal? */
- if (ev->events != POLLIN)
+ if (ev->events != EPOLLIN)
return -EINVAL;
if ((r = manager_process_signal_fd(m, quit)) < 0)
mount_fd_event(m, ev->events);
break;
+ case WATCH_UDEV:
+ /* Some notification from udev, intended for the device subsystem */
+ device_fd_event(m, ev->events);
+ break;
+
default:
assert_not_reached("Unknown epoll event type.");
}