Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBus: enable dbus-daemon.exe to be used as background process #3044

Open
darealshinji opened this issue Feb 3, 2024 · 0 comments
Open

DBus: enable dbus-daemon.exe to be used as background process #3044

darealshinji opened this issue Feb 3, 2024 · 0 comments

Comments

@darealshinji
Copy link
Contributor

I had built an app that uses QtDBus, so I need the DBus daemon to run in background. I can launch it as an autostart process, but the command promt is kept open, which is not what I want. So I've added a call to FreeConsole() to main.c.
I guess this is somewhat similar to running dbus-daemon --fork on Linux. I don't know if I should also open a bug report to upstream.

--- a/bus/main.c
+++ b/bus/main.c
@@ -744,6 +744,10 @@
   _dbus_set_signal_handler (SIGHUP, signal_handler);
 #endif /* DBUS_UNIX */
 
+#ifdef DBUS_WIN
+  FreeConsole();
+#endif /* DBUS_WIN */
+
   _dbus_verbose ("We are on D-Bus...\n");
   _dbus_daemon_report_ready ();
   _dbus_loop_run (bus_context_get_loop (context));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant