1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-11 05:41:32 +03:00

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.
This commit is contained in:
Andrew Dunstan 2024-10-06 10:34:45 -04:00
parent 430ce189fc
commit 70fea390cf

View File

@ -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)