Avoid defining SIGTTIN/SIGTTOU on Windows.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 17 Nov 2018 21:31:07 +0000 (16:31 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 17 Nov 2018 21:31:16 +0000 (16:31 -0500)
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

src/backend/postmaster/postmaster.c
src/include/port/win32_port.h

index 68bb35ab791fe616d9e00db23787bcfa08d01614..a33a131182988b0ca358f4d5b7768e2bf6346834 100644 (file)
@@ -654,8 +654,12 @@ PostmasterMain(int argc, char *argv[])
     * a standalone backend, their default handling is reasonable.  Hence, all
     * child processes should just allow the inherited settings to stand.
     */
+#ifdef SIGTTIN
    pqsignal(SIGTTIN, SIG_IGN); /* ignored */
+#endif
+#ifdef SIGTTOU
    pqsignal(SIGTTOU, SIG_IGN); /* ignored */
+#endif
 
    /* ignore SIGXFSZ, so that ulimit violations work like disk full */
 #ifdef SIGXFSZ
index 360dbdf3a759d6c20ea819c71620524f51717a6f..f9d351f20b7b6615f689df711ed8674004e351ef 100644 (file)
 #define SIGTSTP                18
 #define SIGCONT                19
 #define SIGCHLD                20
-#define SIGTTIN                21
-#define SIGTTOU                22  /* Same as SIGABRT -- no problem, I hope */
 #define SIGWINCH           28
 #define SIGUSR1                30
 #define SIGUSR2                31