chiark / gitweb /
util: properly detect ttyname_r() failing
[elogind.git] / src / manager.c
index 3e742f791e1251b3a3f3e257cb1328e113140696..c8fdbb5dee33993e60c0853bdc0cfb100482952b 100644 (file)
@@ -1,4 +1,4 @@
-/*-*- Mode: C; c-basic-offset: 8 -*-*/
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
 
 /***
   This file is part of systemd.
@@ -1786,7 +1786,7 @@ static int manager_process_notify_fd(Manager *m) {
                         if (n >= 0)
                                 return -EIO;
 
-                        if (errno == EAGAIN)
+                        if (errno == EAGAIN || errno == EINTR)
                                 break;
 
                         return -errno;
@@ -2260,6 +2260,11 @@ void manager_send_unit_audit(Manager *m, Unit *u, int type, bool success) {
         if (m->audit_fd < 0)
                 return;
 
+        /* Don't generate audit events if the service was already
+         * started and we're just deserializing */
+        if (m->n_deserializing > 0)
+                return;
+
         if (!(p = unit_name_to_prefix_and_instance(u->meta.id))) {
                 log_error("Failed to allocate unit name for audit message: %s", strerror(ENOMEM));
                 return;