_dbus_become_daemon: don't pretend it worked
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 29 Aug 2013 10:51:45 +0000 (11:51 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Tue, 3 Sep 2013 11:00:31 +0000 (12:00 +0100)
This function is meaningless (and possibly unimplementable) on Windows.
We shouldn't call it; if we do, it should raise an error.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
dbus/dbus-sysdeps-util-win.c

index fe4b1a2..4678b11 100644 (file)
@@ -65,7 +65,9 @@ _dbus_become_daemon (const DBusString *pidfile,
                      DBusError        *error,
                      dbus_bool_t       keep_umask)
 {
-  return TRUE;
+  dbus_set_error (error, DBUS_ERROR_NOT_SUPPORTED,
+                  "Cannot daemonize on Windows");
+  return FALSE;
 }
 
 /**