core: output unit status output strings to console, only if we actually are changing unit state
Unit _start() and _stop() implementations can fail with -EAGAIN to delay execution temporarily. Thus, we should not output status messages before invoking these calls, but after, and only when we know that the invocation actually made a change.
This commit is contained in:
+2
-2
@@ -1954,7 +1954,7 @@ static int socket_start(Unit *u) {
|
||||
s->result = SOCKET_SUCCESS;
|
||||
socket_enter_start_pre(s);
|
||||
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int socket_stop(Unit *u) {
|
||||
@@ -1985,7 +1985,7 @@ static int socket_stop(Unit *u) {
|
||||
assert(s->state == SOCKET_LISTENING || s->state == SOCKET_RUNNING);
|
||||
|
||||
socket_enter_stop_pre(s, SOCKET_SUCCESS);
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int socket_serialize(Unit *u, FILE *f, FDSet *fds) {
|
||||
|
||||
Reference in New Issue
Block a user