projects
/
pgpool2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d934eb5
)
Fix signal handler for SIGTERM, SIGINT and SIGQUIT.
author
Tatsuo Ishii
<ishii@sraoss.co.jp>
Tue, 12 Oct 2021 01:40:11 +0000
(10:40 +0900)
committer
Tatsuo Ishii
<ishii@sraoss.co.jp>
Tue, 12 Oct 2021 01:42:40 +0000
(10:42 +0900)
It did not properly save errno and it was possible to overwrite errno.
src/protocol/child.c
patch
|
blob
|
blame
|
history
diff --git
a/src/protocol/child.c
b/src/protocol/child.c
index a2faea8785b6752221d03651f5577ed4aae53530..e83ffb95a14d8bd5f8a96044fcdbae24d9aff8a7 100644
(file)
--- a/
src/protocol/child.c
+++ b/
src/protocol/child.c
@@
-1000,10
+1000,10
@@
static RETSIGTYPE die(int sig)
{
int save_errno;
- POOL_SETMASK(&BlockSig);
-
save_errno = errno;
+ POOL_SETMASK(&BlockSig);
+
#ifdef NOT_USED
ereport(LOG,
(errmsg("child process received shutdown request signal %d", sig)));
@@
-1048,8
+1048,9
@@
static RETSIGTYPE die(int sig)
break;
}
- errno = save_errno;
POOL_SETMASK(&UnBlockSig);
+
+ errno = save_errno;
}
/*