diff --git a/lib/log_config.c b/lib/log_config.c index 7dd6278ba..d60ccd654 100644 --- a/lib/log_config.c +++ b/lib/log_config.c @@ -22,6 +22,7 @@ #include #include +#include #include "config.h" #include "log.h" @@ -71,5 +72,7 @@ void cerror(config_setting_t *cfg, const char *fmt, ...) log_print(l, LOG_LVL_ERROR, "%s in %s:%u", buf, file, line); free(buf); - die(); + + killme(SIGABRT); + pause(); } diff --git a/lib/log_helper.c b/lib/log_helper.c index 1467605df..593d3460e 100644 --- a/lib/log_helper.c +++ b/lib/log_helper.c @@ -21,6 +21,7 @@ *********************************************************************************/ #include +#include #include "utils.h" #include "log.h" @@ -84,7 +85,8 @@ void error(const char *fmt, ...) log_vprint(l, LOG_LVL_ERROR, fmt, ap); va_end(ap); - killme(SIGALRM); + killme(SIGABRT); + pause(); } void serror(const char *fmt, ...) @@ -101,5 +103,7 @@ void serror(const char *fmt, ...) log_print(l, LOG_LVL_ERROR, "%s: %m (%u)", buf, errno); free(buf); - killme(SIGALRM); + + killme(SIGABRT); + pause(); } \ No newline at end of file diff --git a/lib/nodes/file.c b/lib/nodes/file.c index e6e01cf25..3f31e2b70 100644 --- a/lib/nodes/file.c +++ b/lib/nodes/file.c @@ -338,6 +338,7 @@ retry: values = sample_io_villas_fscan(f->read.handle->file, s, &flags); /* Get case FILE_EOF_EXIT: info("Reached end-of-file of node %s", node_name(n)); killme(SIGTERM); + pause(); } } diff --git a/lib/nodes/signal.c b/lib/nodes/signal.c index 4b64808ec..ec1bc2a4c 100644 --- a/lib/nodes/signal.c +++ b/lib/nodes/signal.c @@ -159,6 +159,7 @@ int signal_read(struct node *n, struct sample *smps[], unsigned cnt) if (s->limit > 0 && s->counter >= s->limit) { info("Reached limit"); killme(SIGTERM); + pause(); } s->counter += steps; diff --git a/lib/utils.c b/lib/utils.c index 16e7110cb..fea90a9d2 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -88,13 +88,6 @@ double randf() return (double) random() / RAND_MAX; } -void die() -{ - int zero = 0; - log_outdent(&zero); - abort(); -} - char * strcatf(char **dest, const char *fmt, ...) { va_list ap;