aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2011-06-19 00:34:32 +0300
committerPeter Eisentraut <peter_e@gmx.net>2011-06-19 00:34:32 +0300
commit223d14a984e677823bd4f865ff22e14dd3fe9b76 (patch)
tree6d0f636b0a0b3505f1b13882edb5b685fca1a75a /src
parent110c88d35cfcbe63dbb87a88d72f3e2a67a60f65 (diff)
downloadpostgresql-223d14a984e677823bd4f865ff22e14dd3fe9b76.tar.gz
postgresql-223d14a984e677823bd4f865ff22e14dd3fe9b76.zip
Make external_pid_file world readable
Diffstat (limited to 'src')
-rw-r--r--src/backend/postmaster/postmaster.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 1f0d4e63fb0..6572292a40f 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -1024,6 +1024,11 @@ PostmasterMain(int argc, char *argv[])
fprintf(fpidfile, "%d\n", MyProcPid);
fclose(fpidfile);
/* Should we remove the pid file on postmaster exit? */
+
+ /* Make PID file world readable */
+ if (chmod(external_pid_file, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) != 0)
+ write_stderr("%s: could not change permissions of external PID file \"%s\": %s\n",
+ progname, external_pid_file, strerror(errno));
}
else
write_stderr("%s: could not write external PID file \"%s\": %s\n",