get upgrade.pl to fail properly if upgrade script dies
This commit is contained in:
parent
dec515d1cf
commit
38c42d01fd
1 changed files with 7 additions and 2 deletions
|
|
@ -228,9 +228,14 @@ foreach my $filename (keys %config) {
|
|||
if ($upgrade{$upgrade}{pl} ne "") {
|
||||
my $pid = fork;
|
||||
if (!$pid) {
|
||||
@ARGV = ("--configFile=$filename", $quiet ? ('--quiet') : ());
|
||||
$0 = $upgrade{$upgrade}{pl};
|
||||
local @ARGV = ("--configFile=$filename", $quiet ? ('--quiet') : ());
|
||||
local $0 = $upgrade{$upgrade}{pl};
|
||||
local $@;
|
||||
do $0;
|
||||
if ($@) {
|
||||
warn $@;
|
||||
exit 255;
|
||||
};
|
||||
exit;
|
||||
}
|
||||
waitpid $pid, 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue