On Windows, the dbus-daemon is not able to fork (daemonize). If someone
explicitly requests forking, it should fail, but if someone
explicitly requests *not* forking, there seems no harm in allowing it.
A few of the regression tests specifically require a dbus-daemon that
will not fork, so allowing this option on Windows means those tests
don't need an extra OS condition.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
" [--introspect]"
" [--address=ADDRESS]"
" [--nopidfile]"
+ " [--nofork]"
#ifdef DBUS_UNIX
" [--fork]"
- " [--nofork]"
" [--systemd-activation]"
#endif
"\n");
{
introspect ();
}
-#ifdef DBUS_UNIX
else if (strcmp (arg, "--nofork") == 0)
{
flags &= ~BUS_CONTEXT_FLAG_FORK_ALWAYS;
flags |= BUS_CONTEXT_FLAG_FORK_NEVER;
}
+#ifdef DBUS_UNIX
else if (strcmp (arg, "--fork") == 0)
{
flags &= ~BUS_CONTEXT_FLAG_FORK_NEVER;
<para>Force the message bus to fork and become a daemon, even if
the configuration file does not specify that it should.
In most contexts the configuration file already gets this
-right, though.
-<option>--nofork</option>
-Force the message bus not to fork and become a daemon, even if
-the configuration file specifies that it should.</para>
+right, though. This option is not supported on Windows.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>--nofork</option></term>
+ <listitem>
+ <para>Force the message bus not to fork and become a daemon, even if
+ the configuration file specifies that it should. On Windows,
+ the dbus-daemon never forks, so this option is allowed but does
+ nothing.</para>
</listitem>
</varlistentry>
<varlistentry>