app: Clarify message on repeated Ctrl-C

While we have cancellation issues¹, let's help the
user understand that we heard them the first time.

¹ <https://github.com/projectatomic/rpm-ostree/issues/897>

Closes: #948
Approved by: jlebon
This commit is contained in:
Colin Walters 2017-08-24 11:51:50 -04:00 committed by Atomic Bot
parent 06f3a1811a
commit 00231446b3

View File

@ -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;
}