chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
910212e
)
main: only reopen /dev/console if we switch-root to a custom init
author
Harald Hoyer
<harald@redhat.com>
Fri, 13 Jul 2012 12:44:52 +0000
(14:44 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Fri, 13 Jul 2012 12:46:14 +0000
(14:46 +0200)
There's no point in reopening /dev/console if we reopen it anyway
afterwards.
src/core/main.c
patch
|
blob
|
history
diff --git
a/src/core/main.c
b/src/core/main.c
index 87cb4ffb5cc0fae990443bd7813a5ebaf1d8d707..ae3769be5279ed08b2f79794e9cc0dc4072afcea 100644
(file)
--- a/
src/core/main.c
+++ b/
src/core/main.c
@@
-1673,9
+1673,6
@@
finish:
* rebooted while we do that */
watchdog_close(true);
- /* Reopen the console */
- make_console_stdio();
-
if (switch_root_dir) {
/* Kill all remaining processes from the initrd */
broadcast_signal(SIGTERM);
@@
-1733,6
+1730,9
@@
finish:
fds = NULL;
}
+ /* Reopen the console */
+ make_console_stdio();
+
for (j = 1, i = 1; j < argc; j++)
args[i++] = argv[j];
args[i++] = NULL;