[tracker-miners/wip/carlosg/cli-improvements: 39/47] tracker: Silently consume ^C on "tracker3 daemon" looping subcommands
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/cli-improvements: 39/47] tracker: Silently consume ^C on "tracker3 daemon" looping subcommands
- Date: Wed, 19 Aug 2020 11:31:31 +0000 (UTC)
commit 47e96c3d92b2caf5a998d5e463eac2c86df40613
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Aug 18 10:35:01 2020 +0200
tracker: Silently consume ^C on "tracker3 daemon" looping subcommands
In the subcommands that loop for results (-f/-w) we tell to use Ctrl-C,
but are quite noisy after it. Make it a bit less so.
src/tracker/tracker-daemon.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/src/tracker/tracker-daemon.c b/src/tracker/tracker-daemon.c
index 3860d5258..9bef04da9 100644
--- a/src/tracker/tracker-daemon.c
+++ b/src/tracker/tracker-daemon.c
@@ -180,14 +180,8 @@ signal_handler (gpointer user_data)
case SIGINT:
in_loop = TRUE;
g_main_loop_quit (main_loop);
-
- /* Fall through */
+ break;
default:
- if (g_strsignal (signo)) {
- g_message ("Received signal:%d->'%s'",
- signo,
- g_strsignal (signo));
- }
break;
}
@@ -492,6 +486,9 @@ miner_pause (const gchar *miner,
g_object_unref (main_loop);
}
+ /* Carriage return, so we paper over the ^C */
+ g_print ("\r");
+
g_object_unref (manager);
return EXIT_SUCCESS;
@@ -731,6 +728,9 @@ daemon_run (void)
g_main_loop_unref (main_loop);
g_object_unref (notifier);
+ /* Carriage return, so we paper over the ^C */
+ g_print ("\r");
+
return EXIT_SUCCESS;
}
@@ -862,6 +862,9 @@ daemon_run (void)
g_main_loop_run (main_loop);
g_main_loop_unref (main_loop);
+ /* Carriage return, so we paper over the ^C */
+ g_print ("\r");
+
g_hash_table_unref (miners_progress);
g_hash_table_unref (miners_status);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]