summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dbus/dbus-sysdeps-util-unix.c1
-rw-r--r--tools/dbus-launch.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/dbus/dbus-sysdeps-util-unix.c b/dbus/dbus-sysdeps-util-unix.c
index d57e6aad..4f81e6a6 100644
--- a/dbus/dbus-sysdeps-util-unix.c
+++ b/dbus/dbus-sysdeps-util-unix.c
@@ -123,6 +123,7 @@ _dbus_become_daemon (const DBusString *pidfile,
dup2 (dev_null_fd, 2);
else
_dbus_verbose ("keeping stderr open due to DBUS_DEBUG_OUTPUT\n");
+ close (dev_null_fd);
}
if (!keep_umask)
diff --git a/tools/dbus-launch.c b/tools/dbus-launch.c
index bbaac2c3..bb639a11 100644
--- a/tools/dbus-launch.c
+++ b/tools/dbus-launch.c
@@ -583,6 +583,7 @@ babysit (int exit_with_session,
s = getenv ("DBUS_DEBUG_OUTPUT");
if (s == NULL || *s == '\0')
dup2 (dev_null_fd, 2);
+ close (dev_null_fd);
}
else
{