Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd6de430

Browse files
committed
Don't unblock SIGQUIT in the SIGQUIT handler
This was possibly linked to a deadlock-like situation in glibc syslog codeinvoked by the ereport call in quickdie(). In any case, a signal handlershould not unblock its own signal unless there is a specific reason to.
1 parentb63b967 commitd6de430

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

‎src/backend/tcop/postgres.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.577 2009/12/1622:55:33 petere Exp $
11+
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.578 2009/12/1623:05:00 petere Exp $
1212
*
1313
* NOTES
1414
* this is the "main" module of the postgres backend and
@@ -2538,6 +2538,7 @@ drop_unnamed_stmt(void)
25382538
void
25392539
quickdie(SIGNAL_ARGS)
25402540
{
2541+
sigaddset(&BlockSig,SIGQUIT);/* prevent nested calls */
25412542
PG_SETMASK(&BlockSig);
25422543

25432544
/*

‎src/include/libpq/pqsignal.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/include/libpq/pqsignal.h,v 1.35 2009/12/1622:55:34 petere Exp $
10+
* $PostgreSQL: pgsql/src/include/libpq/pqsignal.h,v 1.36 2009/12/1623:05:00 petere Exp $
1111
*
1212
* NOTES
1313
* This shouldn't be in libpq, but the monitor and some other
@@ -38,6 +38,7 @@ extern intUnBlockSig,
3838
intpqsigsetmask(intmask);
3939
#endif
4040

41+
#definesigaddset(set,signum)(*(set) |= (sigmask(signum)))
4142
#definesigdelset(set,signum)(*(set) &= ~(sigmask(signum)))
4243
#endif/* not HAVE_SIGPROCMASK */
4344

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp