finish profctl in case of command stream EOF or read error
authorAlexey Chernobaev <achernobaev@dev.rtsoft.ru>
Thu, 30 Aug 2018 18:58:05 +0000 (21:58 +0300)
committerAleksei Vereshchagin <avereschagin@dev.rtsoft.ru>
Mon, 3 Sep 2018 15:21:42 +0000 (18:21 +0300)
profctl.c

index aeb24f2..6f8fe08 100644 (file)
--- a/profctl.c
+++ b/profctl.c
@@ -497,6 +497,7 @@ static void *command_loop_thread(void *arg)
                        else {
                                log_system_error("cannot read command");
                        }
+                       global_stop = 1;
                        break;
                }
                if (global_stop) {
@@ -583,7 +584,7 @@ static void *command_loop_thread(void *arg)
        free(line);
        command_loop_thread_runs = 0;
        if (verbose) {
-               log_error("command loop finished");
+               log_message("command loop finished");
        }
        return NULL;
 }