Commit 04b8a7a7 authored by Ralf Habacker's avatar Ralf Habacker

Fix warning: variable 'ret' set but not used [-Wunused-but-set-variable].

Only set valid child status in case exit code has been gotten from
child process, otherwise signal failure through thread return value.

Bug: default avatarSimon McVittie <>
parent 34d0c73f
......@@ -616,13 +616,16 @@ babysitter (void *parameter)
DWORD status;
// wait until process finished
WaitForSingleObject (sitter->child_handle, INFINITE);
ret = GetExitCodeProcess (sitter->child_handle, &status);
if (ret)
sitter->child_status = status;
sitter->have_child_status = TRUE;
CloseHandle (sitter->child_handle);
sitter->child_handle = NULL;
......@@ -637,7 +640,7 @@ babysitter (void *parameter)
_dbus_babysitter_unref (sitter);
return 0;
return ret ? 0 : 1;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment