[sr-dev] git:master:65593cc2: core: daemonize - proper chown for pgid file instead of pid file

Daniel-Constantin Mierla miconda at gmail.com
Tue Jul 18 09:16:18 CEST 2017


Module: kamailio
Branch: master
Commit: 65593cc23bc89349fb42566cbd7eb2bbf8744db9
URL: https://github.com/kamailio/kamailio/commit/65593cc23bc89349fb42566cbd7eb2bbf8744db9

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-07-18T09:08:14+02:00

core: daemonize - proper chown for pgid file instead of pid file

---

Modified: src/core/daemonize.c

---

Diff:  https://github.com/kamailio/kamailio/commit/65593cc23bc89349fb42566cbd7eb2bbf8744db9.diff
Patch: https://github.com/kamailio/kamailio/commit/65593cc23bc89349fb42566cbd7eb2bbf8744db9.patch

---

diff --git a/src/core/daemonize.c b/src/core/daemonize.c
index bc51c9674b..98bf04dc78 100644
--- a/src/core/daemonize.c
+++ b/src/core/daemonize.c
@@ -384,7 +384,7 @@ int daemonize(char*  name,  int status_wait)
 			}else{
 				fprintf(pid_stream, "%i\n", (int)pid);
 				fclose(pid_stream);
-				if(chown(pid_file, pid_uid, pid_gid)<0) {
+				if(chown(pgid_file, pid_uid, pid_gid)<0) {
 					LM_ERR("failed to chwon PGID file: %s\n", strerror(errno));
 					goto error;
 				}




More information about the sr-dev mailing list