diff --git a/src/logger.c b/src/logger.c index 8fbd3448..ad7cef28 100644 --- a/src/logger.c +++ b/src/logger.c @@ -26,6 +26,7 @@ #include "logger.h" #include "connection.h" #include "control_common.h" +#include "process.h" #include "sptps.h" debug_t debug_level = DEBUG_NOTHING; @@ -80,7 +81,7 @@ static void real_logger(int level, int priority, const char *message) { break; } - if(umbilical) { + if(umbilical && do_detach) { write(umbilical, message, strlen(message)); write(umbilical, "\n", 1); } diff --git a/src/sptps_speed.c b/src/sptps_speed.c index ab41e8d5..d03246c5 100644 --- a/src/sptps_speed.c +++ b/src/sptps_speed.c @@ -33,6 +33,7 @@ bool send_request(void *c, const char *msg, ...) { return false; } struct list_t *connection_list = NULL; bool send_meta(void *c, const char *msg , int len) { return false; } char *logfilename = NULL; +bool do_detach = false; struct timeval now; static bool send_data(void *handle, uint8_t type, const void *data, size_t len) { diff --git a/src/sptps_test.c b/src/sptps_test.c index 38c2c08e..f83307fe 100644 --- a/src/sptps_test.c +++ b/src/sptps_test.c @@ -35,6 +35,7 @@ bool send_request(void *c, const char *msg, ...) { return false; } struct list_t *connection_list = NULL; bool send_meta(void *c, const char *msg , int len) { return false; } char *logfilename = NULL; +bool do_detach = false; struct timeval now; static bool verbose;