Skip to content

Commit

Permalink
app: Clarify message on repeated Ctrl-C
Browse files Browse the repository at this point in the history
While we have cancellation issues¹, let's help the
user understand that we heard them the first time.

¹ <#897>

Closes: #948
Approved by: jlebon
  • Loading branch information
cgwalters authored and rh-atomic-bot committed Aug 24, 2017
1 parent 06f3a18 commit 8442833
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/app/rpmostree-dbus-helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,8 +545,15 @@ static gboolean
on_sigint (gpointer user_data)
{
GCancellable *cancellable = user_data;
g_printerr ("Caught SIGINT, cancelling transaction\n");
g_cancellable_cancel (cancellable);
if (!g_cancellable_is_cancelled (cancellable))
{
g_printerr ("Caught SIGINT, cancelling transaction\n");
g_cancellable_cancel (cancellable);
}
else
{
g_printerr ("Awaiting transaction cancellation...\n");
}
return TRUE;
}

Expand Down

0 comments on commit 8442833

Please sign in to comment.