dlt-daemon icon indicating copy to clipboard operation
dlt-daemon copied to clipboard

daemon: refactor IPC usage

Open duvanan13 opened this issue 1 year ago • 3 comments
trafficstars

  • Prevent new daemon initialization when using FIFO
  • Unit test gateway IPC changes to UNIX_SOCKET
  • Shared memory is used for multinode testing
  • Resolve the TOCTOU issue

duvanan13 avatar Jul 16 '24 08:07 duvanan13

Thanks @duvanan13 for joining the pair programming section. I believe now you have more experience with source control using git. Thank you for your the rework on this issue, let see how Michael comment about this fix.

Hello @michael-methner , could you kindly review this fix? Thank you

minminlittleshrimp avatar Jul 16 '24 09:07 minminlittleshrimp

Hello @duvanan13 , hello @minminlittleshrimp , this patch prevents are restart after dlt-daemon was not shutdown gracefully (e.g. due to a segmentation fault). Could modify the check so it checks for a running instance of dlt-daemon instead of the files present?

michael-methner avatar Jul 17 '24 09:07 michael-methner

Hello @michael-methner , In the dlt_daemon_signal_handler function in daemon, we've already implemented the unlink for FIFO by calling dlt_daemon_exit_trigger. Hence, my point is to add SIGSEGV to the dlt_daemon_signal_handler: https://github.com/COVESA/dlt-daemon/blob/358ab0879dd27b40a9ba4c411c86f7f017e989b5/src/daemon/dlt-daemon.c#L2135 Please kindly check my point.

duvanan13 avatar Jul 17 '24 10:07 duvanan13