summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-09-12 16:22:44 +0200
committerAnthony G. Basile <blueness@gentoo.org>2014-09-17 19:57:19 -0400
commitb2399d9b7222abe7db8ab4bc16e0efe3ccae4c42 (patch)
tree77cf332c3de22c2647804620c87482929bdd3ef8
parenta3fd1c6811ea93610d1d22451d502519907d3b88 (diff)
udev: don't close std{in,out,err}
Rather than printing debug output to stderr and redirecting this to /dev/null when not wanted, use the correct log_*() function in the first place. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
-rw-r--r--src/udev/udevd.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 042e43a3bd..408497bf26 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -1229,18 +1229,6 @@ int main(int argc, char *argv[]) {
log_info("starting version " VERSION "\n");
- if (!arg_debug) {
- int fd;
-
- fd = open("/dev/null", O_RDWR);
- if (fd >= 0) {
- dup2(fd, STDIN_FILENO);
- dup2(fd, STDOUT_FILENO);
- dup2(fd, STDERR_FILENO);
- close(fd);
- }
- }
-
fd_inotify = udev_watch_init(udev);
if (fd_inotify < 0) {
log_error("error initializing inotify");