Commit 29460b51 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Log an error upon failure to create/open the pid file

parent fc89e941
Pipeline #3578 passed with stage
in 6 minutes and 10 seconds
......@@ -1726,6 +1726,8 @@ int main(int argc, char** argv)
}
/* Open here to use startup permissions to create the file */
pidf=fopen(pid_fname,"w");
if(pidf == NULL)
lprintf(LOG_ERR, "!ERROR %d (%s) creating/opening %s", errno, strerror(errno), pid_fname);
old_uid = getuid();
if((pw_entry=getpwnam(new_uid_name))!=0)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment