COVESA / COVESA/dlt-daemon

Another dlt-dameon recreate fifo file before exit error

Open
#569 8 comments 0 reactions 1 assignee Claimed by @minminlittleshrimp View on GitHub
bug
Dominant language
C
Stars
459
Forks
340
Avg merge
4d 21h
Merged PRs (30d)
2

Description

https://github.com/COVESA/dlt-daemon/blob/a4105dde8871582eaa6d7182db9afa9c2bea54ac/src/daemon/dlt-daemon.c#L1580

```c
static int dlt_daemon_init_fifo(DltDaemonLocal *daemon_local)
{
int ret;
int fd = -1;
int fifo_size;

/* open named pipe(FIFO) to receive DLT messages from users */
umask(0);

/* Try to delete existing pipe, ignore result of unlink */
const char *tmpFifo = daemon_local->flags.daemonFifoName;
unlink(tmpFifo);

ret = mkfifo(tmpFifo, S_IRUSR | S_IWUSR | S_IWGRP);
```
if a dlt-daemon is running, and someone else startup another dlt-daemon again, and it will exit error because of binding ip/port confilct.
But this dlt-daemon will recreate FIFO file, and the first daemon cannot receive any message from FIFO because the old file is deleted

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.