subprocess test: Check wait status correctly

Confusingly, g_spawn_check_exit_status() takes a wait status, not an
exit status, so passing g_subprocess_get_exit_status() to it is
incorrect (although both encodings happen to use 0 to encode success
and a nonzero value to encode failure, so in practice this probably
had the desired effect).

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie 2021-06-14 12:50:39 +01:00
parent 031e5020ee
commit f2be22ca52

View File

@ -611,7 +611,7 @@ on_subprocess_exited (GObject *object,
g_propagate_error (&data->error, error);
}
}
g_spawn_check_exit_status (g_subprocess_get_exit_status (subprocess), &error);
g_spawn_check_exit_status (g_subprocess_get_status (subprocess), &error);
g_assert_no_error (error);
data->events_pending--;
if (data->events_pending == 0)