diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2016-05-16 12:52:25 +0200 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2016-05-16 12:52:25 +0200 |
commit | 7bcaf35bcaf8d594950df9b4a92b6f822ebfcabc (patch) | |
tree | 9c1c1fcb6cdfe6a6adc4cfc46689b928a9134ea5 | |
parent | baeea825a4a84858f7df2755853e0b7d2d2c91e7 (diff) |
Fix ambiguous setup of DBusBabySitter struct member child_handle on Windows.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95191
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
-rw-r--r-- | dbus/dbus-spawn-win.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/dbus/dbus-spawn-win.c b/dbus/dbus-spawn-win.c index cbd26f18..f741f923 100644 --- a/dbus/dbus-spawn-win.c +++ b/dbus/dbus-spawn-win.c @@ -605,6 +605,7 @@ babysitter (void *parameter) { int ret = 0; DBusBabysitter *sitter = (DBusBabysitter *) parameter; + HANDLE handle; PING(); if (sitter->child_setup) @@ -616,11 +617,14 @@ babysitter (void *parameter) _dbus_verbose ("babysitter: spawning %s\n", sitter->log_name); PING(); - sitter->child_handle = spawn_program (sitter->log_name, - sitter->argv, sitter->envp); + handle = spawn_program (sitter->log_name, sitter->argv, sitter->envp); PING(); - if (sitter->child_handle == (HANDLE) -1) + if (handle != INVALID_HANDLE_VALUE) + { + sitter->child_handle = handle; + } + else { sitter->child_handle = NULL; sitter->have_spawn_errno = TRUE; |