summaryrefslogtreecommitdiffstats
path: root/tools/dbus-launch.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/dbus-launch.c')
-rw-r--r--tools/dbus-launch.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/dbus-launch.c b/tools/dbus-launch.c
index d3072782..569a3ca6 100644
--- a/tools/dbus-launch.c
+++ b/tools/dbus-launch.c
@@ -596,14 +596,17 @@ babysit (int exit_with_session,
exit (0);
}
-static void do_close_stderr (void)
+static void
+do_close_stderr (void)
{
+ int fd;
+
fflush (stderr);
/* dbus-launch is a Unix-only program, so we can rely on /dev/null being there.
* We're including unistd.h and we're dealing with sh/csh launch sequences...
*/
- int fd = open ("/dev/null", O_RDWR);
+ fd = open ("/dev/null", O_RDWR);
if (fd == -1)
{
fprintf (stderr, "Internal error: cannot open /dev/null: %s", strerror (errno));