From 2006d9acb1248e4225d31c420520c043b1ae044d Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 19 Jul 2011 12:47:45 +0200 Subject: [PATCH] shutdown: initialize the controlling terminal Thanks Kay Sievers! --- src/shutdown.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shutdown.c b/src/shutdown.c index 0905ef5b..d6b47c5a 100644 --- a/src/shutdown.c +++ b/src/shutdown.c @@ -276,6 +276,9 @@ static int pivot_to_new_root(void) { log_error("Failed to open /dev/console: %m"); else { make_stdio(fd); + /* initialize the controlling terminal */ + setsid(); + ioctl(0, TIOCSCTTY, NULL); } return 0; -- 2.39.5