Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 223d14a

Browse files
committed
Make external_pid_file world readable
1 parent 110c88d commit 223d14a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/backend/postmaster/postmaster.c

+5
Original file line numberDiff line numberDiff line change
@@ -1024,6 +1024,11 @@ PostmasterMain(int argc, char *argv[])
10241024
fprintf(fpidfile, "%d\n", MyProcPid);
10251025
fclose(fpidfile);
10261026
/* Should we remove the pid file on postmaster exit? */
1027+
1028+
/* Make PID file world readable */
1029+
if (chmod(external_pid_file, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) != 0)
1030+
write_stderr("%s: could not change permissions of external PID file \"%s\": %s\n",
1031+
progname, external_pid_file, strerror(errno));
10271032
}
10281033
else
10291034
write_stderr("%s: could not write external PID file \"%s\": %s\n",

0 commit comments

Comments
 (0)