summaryrefslogtreecommitdiff
path: root/src/core/unit.h
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2015-07-16 20:08:30 +0200
committerMichal Schmidt <mschmidt@redhat.com>2015-07-21 15:09:12 +0200
commitd1a34ae9c20f1c02aab17884919eccef572b1d21 (patch)
tree354b377fa1bb4d347a338d221b42c5637ef71cac /src/core/unit.h
parent6913b32249eeaabf00184872de189e1a8889ab74 (diff)
core: fix confusing logging of instantaneous jobs
For instantaneous jobs (e.g. starting of targets, sockets, slices, or Type=simple services) the log shows the job completion before starting: systemd[1]: Created slice -.slice. systemd[1]: Starting -.slice. systemd[1]: Created slice System Slice. systemd[1]: Starting System Slice. systemd[1]: Listening on Journal Audit Socket. systemd[1]: Starting Journal Audit Socket. systemd[1]: Reached target Timers. systemd[1]: Starting Timers. ... The reason is that the job completes before the ->start() method returns and only then does unit_start() print the "Starting ..." message. The same thing happens when stopping units. Rather than fixing the order of the messages, let's just not emit the Starting/Stopping message at all when the job completes instantaneously. The job completion message is sufficient in this case.
Diffstat (limited to 'src/core/unit.h')
-rw-r--r--src/core/unit.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/unit.h b/src/core/unit.h
index 9491ef64f9..e60168267f 100644
--- a/src/core/unit.h
+++ b/src/core/unit.h
@@ -544,6 +544,7 @@ int unit_add_node_link(Unit *u, const char *what, bool wants);
int unit_coldplug(Unit *u);
void unit_status_printf(Unit *u, const char *status, const char *unit_status_msg_format) _printf_(3, 0);
+void unit_status_emit_starting_stopping_reloading(Unit *u, JobType t);
bool unit_need_daemon_reload(Unit *u);