postgresql/src
Tom Lane 125f551c8b Leave SIGTTIN/SIGTTOU signal handling alone in postmaster child processes.
For reasons lost in the mists of time, most postmaster child processes
reset SIGTTIN/SIGTTOU signal handling to SIG_DFL, with the major exception
that backend sessions do not.  It seems like a pretty bad idea for any
postmaster children to do that: if stderr is connected to the terminal,
and the user has put the postmaster in background, any log output would
result in the child process freezing up.  Hence, switch them all to
doing what backends do, ie, nothing.  This allows them to inherit the
postmaster's SIG_IGN setting.  On the other hand, manually-launched
processes such as standalone backends will have default processing,
which seems fine.

In passing, also remove useless resets of SIGCONT and SIGWINCH signal
processing.  Perhaps the postmaster once changed those to something
besides SIG_DFL, but it doesn't now, so these are just wasted (and
confusing) syscalls.

Basically, this propagates the changes made in commit 8e2998d8a from
backends to other postmaster children.  Probably the only reason these
calls now exist elsewhere is that I missed changing pgstat.c along with
postgres.c at the time.

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
2018-11-17 16:31:16 -05:00
..
backend Leave SIGTTIN/SIGTTOU signal handling alone in postmaster child processes. 2018-11-17 16:31:16 -05:00
bin pgbench: introduce a RandomState struct 2018-11-16 16:34:13 -03:00
common Make spelling of "acknowledgment" consistent 2018-10-15 10:06:45 +02:00
fe_utils Fix realfailN lexer rules to not make assumptions about input format. 2018-11-13 14:54:41 -05:00
include Make TupleTableSlots extensible, finish split of existing slot type. 2018-11-16 16:35:15 -08:00
interfaces Second try at fixing numeric data passed through an ECPG SQLDA. 2018-11-14 11:27:47 -05:00
makefiles Refactor installation of extension headers. 2018-09-07 14:19:14 +01:00
pl Fix error-cleanup mistakes in exec_stmt_call(). 2018-11-09 22:04:14 -05:00
port Disable MSVC warning caused by recent snprintf.c changes 2018-11-10 20:20:54 -05:00
template Yet further rethinking of build changes for macOS Mojave. 2018-11-02 18:54:00 -04:00
test Improve performance of partition pruning remapping a little. 2018-11-15 13:34:16 -05:00
timezone Sync our copy of the timezone library with IANA release tzcode2018g. 2018-10-31 09:47:53 -04:00
tools Adjust valgrind fix in commit 517b0d0b5f 2018-11-08 08:38:46 -05:00
tutorial Deduplicate "invalid input syntax" messages for various types. 2018-07-22 14:58:01 -07:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Remove useless symbol from Makefile.global. 2018-11-06 10:57:51 -05:00
Makefile.shlib Don't build static libraries on Cygwin 2018-10-02 16:46:57 -04:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00