From 02181fbb84e432512b2d7e580e6382c867e3bacc Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Fri, 30 Nov 2018 12:13:12 +0100 Subject: [PATCH] indexer bumping: check the status of touch command to avoid cc warning --- src/index/recollindex.cpp | 10 +++++++--- src/qtgui/rclm_idx.cpp | 5 ++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/index/recollindex.cpp b/src/index/recollindex.cpp index 5ff4f176..390fcb8a 100644 --- a/src/index/recollindex.cpp +++ b/src/index/recollindex.cpp @@ -502,9 +502,13 @@ static void lockorexit(Pidfile *pidfile, RclConfig *config) string cmd("touch "); string path = path_cat(config->getConfDir(), "recoll.conf"); cmd += path; - system(cmd.c_str()); - cerr << "Monitoring indexer process was notified of " - "indexing request\n"; + int status; + if ((status = system(cmd.c_str()))) { + cerr << cmd << " failed with status " << status << endl; + } else { + cerr << "Monitoring indexer process was notified of " + "indexing request\n"; + } } #endif } else { diff --git a/src/qtgui/rclm_idx.cpp b/src/qtgui/rclm_idx.cpp index deba8944..19ace869 100644 --- a/src/qtgui/rclm_idx.cpp +++ b/src/qtgui/rclm_idx.cpp @@ -303,7 +303,10 @@ void RclMain::bumpIndexing() string cmd("touch "); string path = path_cat(theconfig->getConfDir(), "recoll.conf"); cmd += path; - system(cmd.c_str()); + int status; + if ((status = system(cmd.c_str()))) { + cerr << cmd << " failed with status " << status << endl; + } } } #else