Skip to content
Snippets Groups Projects
Commit 4c912f70 authored by Ruben Otto's avatar Ruben Otto :crab:
Browse files

fix: remove pipe when daemon is closed

parent 75b0c028
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@
int lock() {
int lockfile_fd;
if ((lockfile_fd = open(LOCKFILE, O_CREAT | O_WRONLY | O_EXCL)) < 0) {
if ((lockfile_fd = open(LOCKFILE, O_CREAT | O_EXCL)) < 0) {
if (errno == EEXIST) {
perror("Lockfile already exists. Maybe another process is already using it?");
} else {
......@@ -81,5 +81,6 @@ int receive_read(receive_t* receive, daemon_measurement_t* daemon_measurement) {
}
int receive_deinit(receive_t* receive) {
remove(DAEMON_PIPE_NAME);
return unlock();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment