summaryrefslogtreecommitdiff
path: root/dbus/dbus-sysdeps-win.h
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2021-11-11 10:01:29 +0100
committerRalf Habacker <ralf.habacker@freenet.de>2021-11-23 08:38:14 +0100
commit79df3d2811343eadcf2f95bacb372729fde1fddd (patch)
tree3c6c3a97b474e79db7903071fb1553a343eb075d /dbus/dbus-sysdeps-win.h
parent3f7c36f4b1d290eeb115921820ba945fc467cad3 (diff)
downloaddbus-79df3d2811343eadcf2f95bacb372729fde1fddd.tar.gz
tools/dbus-run-session: fix race between manual and automatically started dbus-daemon on Windows
dbus-run-session starts a dbus-daemon before the client application. We must avoid letting the application try to connect before the dbus-daemon's DBusServer is listening for connections. In the Unix implementation, we already achieved this via the --print-address option. If the client tried to connect too soon, the server would not yet be listening and the client would fail. In the Windows implementation, we communicate the bus address to the client application as an autolaunch: address, so if the client tried to connect too soon, it would autolaunch a new dbus-daemon instead of using the one that it was intended to use. We can avoid this by using a new option to pass in a Windows event object, which will be set when the server has started and is ready to process connections. Fixes #297
Diffstat (limited to 'dbus/dbus-sysdeps-win.h')
-rw-r--r--dbus/dbus-sysdeps-win.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/dbus/dbus-sysdeps-win.h b/dbus/dbus-sysdeps-win.h
index e9932ff5..cbacd60c 100644
--- a/dbus/dbus-sysdeps-win.h
+++ b/dbus/dbus-sysdeps-win.h
@@ -93,7 +93,10 @@ void _dbus_threads_windows_ensure_ctor_linked (void);
DBUS_PRIVATE_EXPORT
dbus_bool_t _dbus_getsid(char **sid, dbus_pid_t process_id);
-HANDLE _dbus_spawn_program (const char *name, char **argv, char **envp);
+HANDLE _dbus_spawn_program (const char *name,
+ char **argv,
+ char **envp,
+ dbus_bool_t inherit_handles);
DBUS_PRIVATE_EXPORT
void _dbus_win_set_error_from_last_error (DBusError *error,