projects
/
pgpool2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e3048f
)
At pgpool startup, if pid file exists, truncate pid file to zero length before writing.
author
Bo Peng
<pengbo@sraoss.co.jp>
Wed, 12 Aug 2020 07:07:04 +0000
(16:07 +0900)
committer
Bo Peng
<pengbo@sraoss.co.jp>
Wed, 12 Aug 2020 07:16:45 +0000
(16:16 +0900)
Patch is created by maliangzhu.
src/main/main.c
patch
|
blob
|
blame
|
history
diff --git
a/src/main/main.c
b/src/main/main.c
index d7fce18d630ad862343a230b93f0ca4316827a1f..f966cf4302f48edbc120722144eec133dd8503ba 100644
(file)
--- a/
src/main/main.c
+++ b/
src/main/main.c
@@
-560,7
+560,7
@@
static void write_pid_file(void)
pool_config->pid_file_name)));
}
- fd = open(pid_file, O_CREAT
|O_WRONLY, S_IRUSR|
S_IWUSR);
+ fd = open(pid_file, O_CREAT
| O_TRUNC | O_WRONLY, S_IRUSR |
S_IWUSR);
if (fd == -1)
{
ereport(FATAL,