From 0d51497ec0ca08f44d0ed9daf5eecb39ca4e7a23 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 11 Mar 2021 21:39:47 -0800 Subject: [PATCH] Some small fixes --- client/app_control.cpp | 4 +++- client/app_start.cpp | 5 +---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/client/app_control.cpp b/client/app_control.cpp index e133bce5bd..60ac606c19 100644 --- a/client/app_control.cpp +++ b/client/app_control.cpp @@ -669,7 +669,9 @@ bool ACTIVE_TASK::temporary_exit_file_present( x = y; } char *p = fgets(buf, 256, f); // read the \n - p = fgets(buf, 256, f); + if (p) { + p = fgets(buf, 256, f); + } if (p == NULL) { fclose(f); return false; diff --git a/client/app_start.cpp b/client/app_start.cpp index 0e98e5c6a8..aba2ece0dd 100644 --- a/client/app_start.cpp +++ b/client/app_start.cpp @@ -1066,6 +1066,7 @@ int ACTIVE_TASK::start(bool test) { // hook up stderr to a specially-named file // if (freopen(STDERR_FILE, "a", stderr) == NULL) { + _exit(errno); } // lower our priority if needed @@ -1250,10 +1251,6 @@ void run_test_app() { RESULT result; int retval; - char buf[256]; - if (getcwd(buf, sizeof(buf)) == NULL) { // so we can see where we're running - } - gstate.run_test_app = true; wu.project = &project;