From 732d1963ed83abf4e5f1b06ec451a6943421d716 Mon Sep 17 00:00:00 2001
From: Guo Wenxue <guowenxue@gmail.com>
Date: Thu, 22 Sep 2022 00:36:11 +0800
Subject: [PATCH] update ds18b20.c to snprintf

---
 apue/project_socket/src/util_proc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/apue/project_socket/src/util_proc.c b/apue/project_socket/src/util_proc.c
index 039443d..1878b85 100644
--- a/apue/project_socket/src/util_proc.c
+++ b/apue/project_socket/src/util_proc.c
@@ -356,7 +356,7 @@
  * *****************************************************************************/
 int set_daemon_running(const char *pid_file)
 {
-    daemonize(0, 1);
+    daemon(1, 1);
     log_info("Program running as daemon [PID:%d].\n", getpid());
 
     if (record_daemon_pid(pid_file) < 0)

--
Gitblit v1.9.1