diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2024-10-06 10:34:45 -0400 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2024-10-06 10:34:45 -0400 |
commit | 70fea390cfa71c438998993bebfb584effd3e7df (patch) | |
tree | 76525b1b9d7c604713bcfc7710b55c8698c4a811 /src/test/perl/PostgreSQL/Test/Cluster.pm | |
parent | 430ce189fc4521a1c197eee36b8ca6b37b29e86e (diff) | |
download | postgresql-70fea390cfa71c438998993bebfb584effd3e7df.tar.gz postgresql-70fea390cfa71c438998993bebfb584effd3e7df.zip |
Move Cluster.pm initialization code to a more obvious place
Commit 460c0076e8 added some module intialization code to set signal
handlers. However, that code has now become somewhat buried, as later
commits added new subroutines. Therefore, move the initialization code
to the module's INIT block where it won't become obscured.
Diffstat (limited to 'src/test/perl/PostgreSQL/Test/Cluster.pm')
-rw-r--r-- | src/test/perl/PostgreSQL/Test/Cluster.pm | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm index 90a842f96ab..30857f34bff 100644 --- a/src/test/perl/PostgreSQL/Test/Cluster.pm +++ b/src/test/perl/PostgreSQL/Test/Cluster.pm @@ -175,6 +175,11 @@ INIT $portdir =~ s!\\!/!g; # Make sure the directory exists mkpath($portdir) unless -d $portdir; + + # + # Signal handlers + # + $SIG{TERM} = $SIG{INT} = sub { die "death by signal"; }; } =pod @@ -3350,13 +3355,6 @@ sub corrupt_page_checksum return; } -# -# Signal handlers -# -$SIG{TERM} = $SIG{INT} = sub { - die "death by signal"; -}; - =pod =item $node->log_standby_snapshot(self, standby, slot_name) |