pgsql: Close stdin where it's not needed in TestLib.pm procedures - Mailing list pgsql-committers

From Andrew Dunstan
Subject pgsql: Close stdin where it's not needed in TestLib.pm procedures
Date
Msg-id E1iZLUQ-0006Kb-MM@gemulon.postgresql.org
Whole thread Raw
Responses Re: pgsql: Close stdin where it's not needed in TestLib.pm procedures  (Michael Paquier <michael@paquier.xyz>)
List pgsql-committers
Close stdin where it's not needed in TestLib.pm procedures

Where possible, do this using a pseudoterminal, so that things like
openssl that want to open /dev/tty if stdin isn't a tty won't.
Elsewhere, i.e. Windows, just close by providing an empty string using
the standard IPC::Run pipe mechanism.

Patch by Andrew Dunstan, based on an idea from Craig Ringer.

Reviewed by Mark Dilger.

Discussion: https://postgr.es/m/873ebb57-fc98-340d-949d-691b1810bf66@2ndQuadrant.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9af34f3c6b02779fac6dbb6cd4c5bb225a019f43

Modified Files
--------------
src/test/perl/TestLib.pm | 37 +++++++++++++++++++++++++++----------
1 file changed, 27 insertions(+), 10 deletions(-)


pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pgsql: Refactor WAL file-reading code into WALRead()
Next
From: Robert Haas
Date:
Subject: pgsql: Use procsignal_sigusr1_handler for auxiliary processes.