summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-08-18 21:39:39 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-10-21 18:29:52 -0400
commit1724c7040a5d314370e932673a4175eabb136c86 (patch)
tree3ffcc545838b0fec7b07991e603a9c6ec5111a6f
parentf4cced93a1df9cbbd06cc954bd7b18610c054eae (diff)
Revert "pid1: reconnect to the console before being re-executed"systemd/v231-3
This reverts commit affd7ed1a923b0df8479cff1bd9eafb625fdaa66. > So it looks like make_console_stdio() has bad side effect. More specifically it > does a TIOCSCTTY ioctl (via acquire_terminal()) which sees to disturb the > process which was using/owning the console. Fixes #3842. https://bugs.debian.org/834367 https://bugzilla.redhat.com/show_bug.cgi?id=1367766 (cherry picked from commit bd64d82c1c0e3fe2a5f9b3dd9132d62834f50b2d)
-rw-r--r--src/core/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/main.c b/src/core/main.c
index f2adca7d2b..f59a55f166 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -2016,9 +2016,6 @@ finish:
log_error_errno(r, "Failed to switch root, trying to continue: %m");
}
- /* Reopen the console */
- (void) make_console_stdio();
-
args_size = MAX(6, argc+1);
args = newa(const char*, args_size);
@@ -2066,6 +2063,9 @@ finish:
arg_serialization = safe_fclose(arg_serialization);
fds = fdset_free(fds);
+ /* Reopen the console */
+ (void) make_console_stdio();
+
for (j = 1, i = 1; j < (unsigned) argc; j++)
args[i++] = argv[j];
args[i++] = NULL;