chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
git: hide org.freedesktop.systemd1.policy.in
[elogind.git]
/
src
/
shutdown.c
diff --git
a/src/shutdown.c
b/src/shutdown.c
index 0905ef5b3a96ab5523d9aa5a26db1814e1f64085..6714927f86391d2e95013bc09990364b79e85cc0 100644
(file)
--- a/
src/shutdown.c
+++ b/
src/shutdown.c
@@
-276,6
+276,10
@@
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(STDIN_FILENO, TIOCSCTTY, NULL);
}
return 0;