1
0
mirror of https://github.com/systemd/systemd.git synced 2025-02-04 21:47:31 +03:00

shutdown: initialize the controlling terminal

Thanks Kay Sievers!
This commit is contained in:
Harald Hoyer 2011-07-19 12:47:45 +02:00 committed by Lennart Poettering
parent 3b8a1f3fee
commit 2006d9acb1

View File

@ -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;