mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-02-03 18:20:29 +01:00
dbus-spawn-win.c: Don't wait for babysitter thread to start
Now that we start the spawned program from the main thread, there is no need to wait for it before dereferencing `sitter->child_handle`. Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
This commit is contained in:
parent
61c76cae02
commit
bcd750fa2e
1 changed files with 0 additions and 22 deletions
|
|
@ -61,9 +61,6 @@
|
|||
struct DBusBabysitter
|
||||
{
|
||||
DBusAtomic refcount;
|
||||
|
||||
HANDLE start_sync_event;
|
||||
|
||||
char *log_name;
|
||||
|
||||
HANDLE thread_handle;
|
||||
|
|
@ -110,13 +107,6 @@ _dbus_babysitter_new (void)
|
|||
|
||||
_dbus_babysitter_trace_ref (sitter, old_refcount, old_refcount+1, __FUNCTION__);
|
||||
|
||||
sitter->start_sync_event = CreateEvent (NULL, FALSE, FALSE, NULL);
|
||||
if (sitter->start_sync_event == NULL)
|
||||
{
|
||||
_dbus_babysitter_unref (sitter);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
sitter->child_handle = NULL;
|
||||
|
||||
sitter->socket_to_babysitter = sitter->socket_to_main = _dbus_socket_get_invalid ();
|
||||
|
|
@ -218,13 +208,6 @@ _dbus_babysitter_unref (DBusBabysitter *sitter)
|
|||
if (sitter->watches)
|
||||
_dbus_watch_list_free (sitter->watches);
|
||||
|
||||
if (sitter->start_sync_event != NULL)
|
||||
{
|
||||
PING();
|
||||
CloseHandle (sitter->start_sync_event);
|
||||
sitter->start_sync_event = NULL;
|
||||
}
|
||||
|
||||
if (sitter->thread_handle)
|
||||
{
|
||||
CloseHandle (sitter->thread_handle);
|
||||
|
|
@ -570,8 +553,6 @@ babysitter (void *parameter)
|
|||
DBusBabysitter *sitter = (DBusBabysitter *) parameter;
|
||||
|
||||
PING();
|
||||
SetEvent (sitter->start_sync_event);
|
||||
|
||||
if (sitter->child_handle != NULL)
|
||||
{
|
||||
DWORD status;
|
||||
|
|
@ -716,9 +697,6 @@ _dbus_spawn_async_with_babysitter (DBusBabysitter **sitter_p,
|
|||
goto out0;
|
||||
}
|
||||
|
||||
PING();
|
||||
WaitForSingleObject (sitter->start_sync_event, INFINITE);
|
||||
|
||||
PING();
|
||||
if (sitter_p != NULL)
|
||||
*sitter_p = sitter;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue