inittab: don't close fds unconditionally since this breaks UML
authorSteven Barth <steven@midlink.org>
Fri, 9 Jan 2015 08:39:22 +0000 (09:39 +0100)
committerSteven Barth <steven@midlink.org>
Fri, 9 Jan 2015 08:39:22 +0000 (09:39 +0100)
Signed-off-by: Steven Barth <steven@midlink.org>
inittab.c

index 2efbf4d..623103d 100644 (file)
--- a/inittab.c
+++ b/inittab.c
@@ -99,10 +99,6 @@ static void fork_worker(struct init_action *a)
        if (!a->proc.pid) {
                p = setsid();
 
        if (!a->proc.pid) {
                p = setsid();
 
-               close(STDIN_FILENO);
-               close(STDOUT_FILENO);
-               close(STDERR_FILENO);
-
                fd = dev_open(a->id);
                if (fd != -1)
                {
                fd = dev_open(a->id);
                if (fd != -1)
                {