chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dbus: simplify some dbus error messages a bit
[elogind.git]
/
src
/
manager.c
diff --git
a/src/manager.c
b/src/manager.c
index 3e742f791e1251b3a3f3e257cb1328e113140696..09b2c789ed0c5de538f35ef07cd46a9fa61d366d 100644
(file)
--- a/
src/manager.c
+++ b/
src/manager.c
@@
-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.
/***
This file is part of systemd.
@@
-57,6
+57,7
@@
#include "path-lookup.h"
#include "special.h"
#include "bus-errors.h"
#include "path-lookup.h"
#include "special.h"
#include "bus-errors.h"
+#include "exit-status.h"
/* As soon as 16 units are in our GC queue, make sure to run a gc sweep */
#define GC_QUEUE_ENTRIES_MAX 16
/* As soon as 16 units are in our GC queue, make sure to run a gc sweep */
#define GC_QUEUE_ENTRIES_MAX 16
@@
-1786,7
+1787,7
@@
static int manager_process_notify_fd(Manager *m) {
if (n >= 0)
return -EIO;
if (n >= 0)
return -EIO;
- if (errno == EAGAIN)
+ if (errno == EAGAIN
|| errno == EINTR
)
break;
return -errno;
break;
return -errno;
@@
-1885,7
+1886,9
@@
static int manager_dispatch_sigchld(Manager *m) {
(long unsigned) si.si_pid,
sigchld_code_to_string(si.si_code),
si.si_status,
(long unsigned) si.si_pid,
sigchld_code_to_string(si.si_code),
si.si_status,
- strna(si.si_code == CLD_EXITED ? exit_status_to_string(si.si_status) : signal_to_string(si.si_status)));
+ strna(si.si_code == CLD_EXITED
+ ? exit_status_to_string(si.si_status, EXIT_STATUS_FULL)
+ : signal_to_string(si.si_status)));
if (!u)
continue;
if (!u)
continue;
@@
-1928,7
+1931,7
@@
static int manager_process_signal_fd(Manager *m) {
if (n >= 0)
return -EIO;
if (n >= 0)
return -EIO;
- if (errno == EAGAIN)
+ if (errno == E
INTR || errno == E
AGAIN)
break;
return -errno;
break;
return -errno;
@@
-2260,6
+2263,11
@@
void manager_send_unit_audit(Manager *m, Unit *u, int type, bool success) {
if (m->audit_fd < 0)
return;
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;
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;