aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/akcom-udpechod.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/akcom-udpechod.c b/src/akcom-udpechod.c
index 880a4ef..aca6aba 100644
--- a/src/akcom-udpechod.c
+++ b/src/akcom-udpechod.c
@@ -719,7 +719,13 @@ my_daemonize(
719 // record PID in pidfile 719 // record PID in pidfile
720 pid = getpid(); 720 pid = getpid();
721 snprintf(buff, sizeof(buff), "%i", pid); 721 snprintf(buff, sizeof(buff), "%i", pid);
722 write(fd, buff, strlen(buff)); 722 if (write(fd, buff, strlen(buff)) == -1)
723 {
724 close(fd);
725 unlink(cnf_pidfile);
726 my_error("write(): %s: %s", cnf_pidfile, strerror(errno));
727 return(-1);
728 };
723 close(fd); 729 close(fd);
724 730
725 // opens syslog 731 // opens syslog