65 DLT_STRING(
"dlt-system-process-handling, daemonize"));
84 for(i = getdtablesize(); i >= 0; i--)
87 int fd = open(
"/dev/null",O_RDWR);
93 if(dup(fd) < 0 || dup(fd) < 0)
103 signal(SIGCHLD, SIG_IGN);
104 signal(SIGTSTP, SIG_IGN);
105 signal(SIGTTOU, SIG_IGN);
106 signal(SIGTTIN, SIG_IGN);
114 DLT_STRING(
"dlt-system-process-handling, start threads"));
124 #if defined(DLT_SYSTEMD_WATCHDOG_ENABLE) 125 start_systemd_watchdog(config);
143 #if defined(DLT_SYSTEMD_JOURNAL_ENABLE) 145 start_systemd_journal(config);
158 DLT_STRING(
"dlt-system-process-handling, waiting for threads to exit."));
160 if(threads.
count < 1)
163 DLT_STRING(
"dlt-system-process-handling, no threads, waiting for signal."));
169 DLT_STRING(
"dlt-system-process-handling, thread count: "),
172 for (i = 0; i < threads.
count; i++)
176 DLT_STRING(
"dlt-system-process-handling, thread exit: "),
185 DLT_STRING(
"dlt-system-process-handling, signal handler"));
194 DLT_STRING(
"dlt-system-process-handling, exit, signal: "),
200 DLT_STRING(
"dlt-system-process-handling, unknown signal!"));
void start_threads(DltSystemConfiguration *config)
DLT_IMPORT_CONTEXT(dltsystem)
volatile DltSystemThreads threads
void start_logfile(DltSystemConfiguration *conf)
void dlt_system_signal_handler(int sig)
void start_filetransfer(DltSystemConfiguration *conf)
FiletransferOptions Filetransfer
#define DLT_LOG(CONTEXT, LOGLEVEL, ARGS...)
void start_logprocess(DltSystemConfiguration *conf)
void start_syslog(DltSystemConfiguration *conf)
LogProcessOptions LogProcesses
pthread_t threads[MAX_THREADS]