From: Harald Hoyer Date: Tue, 19 Jul 2011 10:47:45 +0000 (+0200) Subject: shutdown: initialize the controlling terminal X-Git-Tag: v31~30 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2006d9acb1248e4225d31c420520c043b1ae044d;p=systemd shutdown: initialize the controlling terminal Thanks Kay Sievers! --- 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;