Skip to content

Commit 37afc07

Browse files
committed
Avoid defining SIGTTIN/SIGTTOU on Windows.
Setting them to SIG_IGN seems unlikely to have any beneficial effect on that platform, and given the signal numbering collision with SIGABRT, it could easily have bad effects. Given the lack of field complaints that can be traced to this, I don't presently feel a need to back-patch. Discussion: https://postgr.es/m/5627.1542477392@sss.pgh.pa.us
1 parent 125f551 commit 37afc07

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/backend/postmaster/postmaster.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,8 +654,12 @@ PostmasterMain(int argc, char *argv[])
654654
* a standalone backend, their default handling is reasonable. Hence, all
655655
* child processes should just allow the inherited settings to stand.
656656
*/
657+
#ifdef SIGTTIN
657658
pqsignal(SIGTTIN, SIG_IGN); /* ignored */
659+
#endif
660+
#ifdef SIGTTOU
658661
pqsignal(SIGTTOU, SIG_IGN); /* ignored */
662+
#endif
659663

660664
/* ignore SIGXFSZ, so that ulimit violations work like disk full */
661665
#ifdef SIGXFSZ

src/include/port/win32_port.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,6 @@
171171
#define SIGTSTP 18
172172
#define SIGCONT 19
173173
#define SIGCHLD 20
174-
#define SIGTTIN 21
175-
#define SIGTTOU 22 /* Same as SIGABRT -- no problem, I hope */
176174
#define SIGWINCH 28
177175
#define SIGUSR1 30
178176
#define SIGUSR2 31

0 commit comments

Comments
 (0)