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: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=2006d9acb1248e4225d31c420520c043b1ae044d;ds=sidebyside shutdown: initialize the controlling terminal Thanks Kay Sievers! --- diff --git a/src/shutdown.c b/src/shutdown.c index 0905ef5b3..d6b47c5a7 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;