1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

utils: die() has been superseeded by killme()

This commit is contained in:
Steffen Vogel 2017-07-12 00:58:37 +02:00
parent 82bc32c206
commit 45ec574011
5 changed files with 12 additions and 10 deletions

View file

@ -22,6 +22,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#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();
}

View file

@ -21,6 +21,7 @@
*********************************************************************************/
#include <errno.h>
#include <unistd.h>
#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();
}

View file

@ -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();
}
}

View file

@ -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;

View file

@ -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;