From 5286c93d69500377ada66cd9393ab2c722f62678 Mon Sep 17 00:00:00 2001 From: OpenGnSys Support Team Date: Thu, 6 Aug 2020 10:36:32 +0200 Subject: #980 error reporting in setclientmode Add syslog and use exit() --- src/rest.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/rest.c b/src/rest.c index 5f5e3f5..ec6ca63 100644 --- a/src/rest.c +++ b/src/rest.c @@ -986,7 +986,9 @@ static int og_set_client_mode(struct og_dbi *dbi, const char *mac, if (fork() == 0) { execlp("/bin/bash", "/bin/bash", "/opt/opengnsys/bin/setclientmode", filename, NULL); - _exit(1); + syslog(LOG_ERR, "failed script execution (%s:%d)\n", + __func__, __LINE__); + exit(EXIT_FAILURE); } else { wait(&status); } -- cgit v1.2.3-18-g5258