summaryrefslogtreecommitdiff
path: root/mdmon.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdmon.c')
-rw-r--r--mdmon.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/mdmon.c b/mdmon.c
index ff985d2..c71e62c 100644
--- a/mdmon.c
+++ b/mdmon.c
@@ -546,14 +546,7 @@ static int mdmon(char *devnm, int must_fork, int takeover)
}
setsid();
- close(0);
- open("/dev/null", O_RDWR);
- close(1);
- ignore = dup(0);
-#ifndef DEBUG
- close(2);
- ignore = dup(0);
-#endif
+ manage_fork_fds(0);
/* This silliness is to stop the compiler complaining
* that we ignore 'ignore'