From 8754c50d230b218a8edc335a7ec47ce23285c73f Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sat, 10 Jun 2023 14:30:29 +0200 Subject: [PATCH 1/2] Do not ignore write return value #36 --- BaseCommon/Daemon.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/BaseCommon/Daemon.cpp b/BaseCommon/Daemon.cpp index aa34ed7..4c4b193 100644 --- a/BaseCommon/Daemon.cpp +++ b/BaseCommon/Daemon.cpp @@ -169,7 +169,11 @@ DAEMONIZE_RESULT CDaemon::daemonise(const std::string& pidFile, const std::strin char str[256]; sprintf(str, "%d\n", getpid()); /* Write PID to lockfile */ - write(m_pid_fd, str, strlen(str)); + ssize_t writeCount = write(m_pid_fd, str, strlen(str)); + if(writeCount < 0) { + CLog::logFatal("Failed to write to PID File. Err: %d", errno); + return DR_FAILURE; + } } return DR_CHILD; From a5d88fc4d0ceff64e2969d85ebd6208849140d58 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sat, 15 Jul 2023 07:30:22 +0200 Subject: [PATCH 2/2] #36 Update readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1581021..573e5c3 100644 --- a/README.md +++ b/README.md @@ -147,6 +147,7 @@ The testing framwework used is Google Test. # 5. Version History ## 5.1. Version 1.0 - [**Bugfix**] Fix #37 Unable to transmit multiple files (DGWVoiceTransmit) ([#37](https://github.com/F4FXL/DStarGateway/issues/37)) +- [**Bugfix**] Fix #36 Error1 Build fails in some environment ([#37](https://github.com/F4FXL/DStarGateway/issues/36)) ## 5.2. Version 0.7 - [**Bugfix**] Unknow repeater entries in log when using Icom Hardware ([#34](https://github.com/F4FXL/DStarGateway/issues/34)) - [**Bugfix**] Malformed callsign in some cases when using DV-G (NMEA) ([#33](https://github.com/F4FXL/DStarGateway/issues/33))