summaryrefslogtreecommitdiff
path: root/src/system/dlt-system.c
diff options
context:
space:
mode:
authorBiastoch, Darian (ADITG/ESM) <dbiastoch@de.adit-jv.com>2021-07-16 00:29:10 +0000
committerSaya Sugiura <39760799+ssugiura@users.noreply.github.com>2021-10-05 11:19:26 +0900
commit50a385e6afea50922569828438194477537a768b (patch)
tree120995ed2095145b31caf2958ddd259ced88786d /src/system/dlt-system.c
parent0ee7fdff3d6bb2f2055e7083fa48728f4d274661 (diff)
downloadDLT-daemon-50a385e6afea50922569828438194477537a768b.tar.gz
system: use signalfd for dlt-system
1: Move the call of pthread_sigmask in dlt-qnx-systems main before DLT_REGISTER_APP, because this already spawns a thread, what was done without applying pthread_sigmask before. 2: Replaced all threads in dlt-system, that are spawned for each feature, through one poll. This poll waits for a file descriptor event, that triggers the feature routine, that was executed before in the thread. Done this for following processes: * reading syslog and journal * frequently reading logfile and logprocess * triggering filetransfer, if a file was added/changed in watched directory * checking watchdog timer of systemd service file with defined intervall Signed-off-by: dbiastoch <dbiastoch@de.adit-jv.com>
Diffstat (limited to 'src/system/dlt-system.c')
-rw-r--r--src/system/dlt-system.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/system/dlt-system.c b/src/system/dlt-system.c
index 0b3cd0d..92ea466 100644
--- a/src/system/dlt-system.c
+++ b/src/system/dlt-system.c
@@ -112,11 +112,10 @@ int main(int argc, char *argv[])
signal(SIGQUIT, dlt_system_signal_handler);
signal(SIGINT, dlt_system_signal_handler);
- DLT_LOG(dltsystem, DLT_LOG_DEBUG, DLT_STRING("Launching threads."));
+ DLT_LOG(dltsystem, DLT_LOG_DEBUG, DLT_STRING("Initializing all processes and starting poll for events."));
- start_threads(&config);
- join_threads();
+ start_dlt_system_processes(&config);
return 0;
}