chiark / gitweb /
shutdown: untabify
authorLennart Poettering <lennart@poettering.net>
Fri, 22 Jul 2011 02:32:22 +0000 (04:32 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 22 Jul 2011 02:32:22 +0000 (04:32 +0200)
src/shutdown.c

index d6b47c5..6714927 100644 (file)
@@ -276,9 +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(0, TIOCSCTTY, NULL);
+
+                /* Initialize the controlling terminal */
+                setsid();
+                ioctl(STDIN_FILENO, TIOCSCTTY, NULL);
         }
 
         return 0;