chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
systemd: do not output status messages once gettys are running
[elogind.git]
/
src
/
core
/
unit.c
diff --git
a/src/core/unit.c
b/src/core/unit.c
index dd08011ff4801adbbf20767b02971e2d423f68c4..f4f92f0fcaf7ff6853030f80b9e5e3e0bb2f6aaf 100644
(file)
--- a/
src/core/unit.c
+++ b/
src/core/unit.c
@@
-1425,10
+1425,14
@@
void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
if (UNIT_IS_INACTIVE_OR_FAILED(os) != UNIT_IS_INACTIVE_OR_FAILED(ns)) {
ExecContext *ec = unit_get_exec_context(u);
if (ec && exec_context_may_touch_console(ec)) {
if (UNIT_IS_INACTIVE_OR_FAILED(os) != UNIT_IS_INACTIVE_OR_FAILED(ns)) {
ExecContext *ec = unit_get_exec_context(u);
if (ec && exec_context_may_touch_console(ec)) {
- if (UNIT_IS_INACTIVE_OR_FAILED(ns))
- m->n_on_console--;
- else
- m->n_on_console++;
+ if (UNIT_IS_INACTIVE_OR_FAILED(ns)) {
+ m->n_on_console --;
+
+ if (m->n_on_console == 0)
+ /* unset no_console_output flag, since the console is free */
+ m->no_console_output = 0;
+ } else
+ m->n_on_console ++;
}
}
}
}
@@
-2326,7
+2330,7
@@
int unit_deserialize(Unit *u, FILE *f, FDSet *fds) {
char *s;
s = strdup(v);
char *s;
s = strdup(v);
- if (!
v
)
+ if (!
s
)
return -ENOMEM;
free(u->cgroup_path);
return -ENOMEM;
free(u->cgroup_path);