Skip to content

Commit 70fea39

Browse files
committed
Move Cluster.pm initialization code to a more obvious place
Commit 460c007 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.
1 parent 430ce18 commit 70fea39

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/test/perl/PostgreSQL/Test/Cluster.pm

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ INIT
175175
$portdir =~ s!\\!/!g;
176176
# Make sure the directory exists
177177
mkpath($portdir) unless -d $portdir;
178+
179+
#
180+
# Signal handlers
181+
#
182+
$SIG{TERM} = $SIG{INT} = sub { die "death by signal"; };
178183
}
179184

180185
=pod
@@ -3350,13 +3355,6 @@ sub corrupt_page_checksum
33503355
return;
33513356
}
33523357

3353-
#
3354-
# Signal handlers
3355-
#
3356-
$SIG{TERM} = $SIG{INT} = sub {
3357-
die "death by signal";
3358-
};
3359-
33603358
=pod
33613359
33623360
=item $node->log_standby_snapshot(self, standby, slot_name)

0 commit comments

Comments
 (0)