Skip to content

Commit

Permalink
session-helper: Properly report p11-kit exit status
Browse files Browse the repository at this point in the history
Use the API that GLib offers for this.

Closes: #2252
Approved by: matthiasclasen
  • Loading branch information
Matthias Clasen authored and rh-atomic-bot committed Oct 23, 2018
1 parent 6b0329b commit 4ef317c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions session-helper/flatpak-session-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,13 +659,13 @@ start_p11_kit_server (const char *flatpak_dir)
&p11_kit_stdout, NULL,
&exit_status, &local_error))
{
g_warning ("Unable to start p11-kit server: %s\n", local_error->message);
g_warning ("Unable to start p11-kit server: %s", local_error->message);
return;
}

if (exit_status != 0)
if (!g_spawn_check_exit_status (exit_status, &local_error))
{
g_warning ("Unable to start p11-kit server, exited with status %d\n", exit_status);
g_warning ("Unable to start p11-kit server: %s", local_error->message);
return;
}

Expand Down

0 comments on commit 4ef317c

Please sign in to comment.