[tracker-miners/wip/carlosg/cli-improvements: 18/30] tracker-extract: Avoid shutdown timeout if running from a terminal
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/cli-improvements: 18/30] tracker-extract: Avoid shutdown timeout if running from a terminal
- Date: Tue, 18 Aug 2020 09:18:31 +0000 (UTC)
commit 821fae87e438bae4ef1579b49422b4f4bfe50534
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Aug 17 17:59:55 2020 +0200
tracker-extract: Avoid shutdown timeout if running from a terminal
Not strictly an user-facing CLI improvement, but this has been bugging
me forever. Make tracker-extract whether it's running on a tty, and avoid
the shutdown timeout in that case.
This is useful for debugging, as you can fire tracker-extract up, and
have it wait for triggered events, instead of timing everything perfectly.
src/tracker-extract/tracker-main.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/src/tracker-extract/tracker-main.c b/src/tracker-extract/tracker-main.c
index 72c79fd5b..36c282137 100644
--- a/src/tracker-extract/tracker-main.c
+++ b/src/tracker-extract/tracker-main.c
@@ -270,6 +270,13 @@ on_decorator_finished (TrackerDecorator *decorator,
{
if (shutdown_timeout_id != 0)
return;
+
+ /* For debugging convenience, avoid the shutdown timeout if running
+ * on a terminal.
+ */
+ if (tracker_term_is_tty ())
+ return;
+
shutdown_timeout_id = g_timeout_add_seconds (10, shutdown_timeout_cb,
main_loop);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]