Commit e95e7563 authored by Philippe Gerum's avatar Philippe Gerum
Browse files

utils/autotune: protect against SIGHUP in background mode

parent efd5d744
......@@ -24,6 +24,7 @@
#include <pthread.h>
#include <limits.h>
#include <time.h>
#include <signal.h>
#include <error.h>
#include <sys/cobalt.h>
#include <rtdm/autotune.h>
......@@ -285,6 +286,7 @@ int main(int argc, char *const argv[])
error(1, errno, "cannot set CPU affinity");
if (background) {
signal(SIGHUP, SIG_IGN);
ret = daemon(0, 0);
if (ret)
error(1, errno, "cannot daemonize");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment