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:
parent
3b8a1f3fee
commit
2006d9acb1
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user