Commit d2d37bae authored by Stefan Tauner's avatar Stefan Tauner
Browse files

fiji_download_gui.pl: try to join threads before exiting also in case of errors

But the obvious solution fails... add a FIXME instead
parent 90e0b9a5
......@@ -85,6 +85,7 @@ sub main {
my $logger = get_logger("");
my $name = $0;
my @ARGV = @_;
my $ret = 0;
$name =~ s/\.p[lm]//;
$logger->debug("=== Starting new execution of $name ===");
$logger->debug( sprintf( "%d argument(s)%s", scalar(@_), scalar(@_) > 0 ? ": @_" : "" ) );
......@@ -135,7 +136,8 @@ sub main {
-title => 'Open FIJI settings failed!',
-text => "$msg\n",
)->Show();
return;
$ret = 1;
goto bailout;
}
$self->{'settings'} = $tmp_settings;
}
......@@ -145,7 +147,8 @@ sub main {
}
if ( !defined ${ $self->{'settings_ini_name'} } ) {
return 1;
$ret = 1;
goto bailout;
}
if ( defined $ARGV[1] ) {
......@@ -160,7 +163,8 @@ sub main {
-title => 'Open FIJI Tests failed!',
-text => "$msg\n",
)->Show();
return;
$ret = 1;
goto bailout;
}
$self->{'tests'} = $tmp_tests;
} else {
......@@ -199,13 +203,14 @@ sub main {
MainLoop;
bailout: # FIXME: this should join threads... but doing that segfaults O_o
# End the queue so the thread can die
$qw->end();
$worker_tid->join();
bailout: # FIXME: this should be above the block above to join all threads... but doing that segfaults O_o
$logger->trace("=== Stopping execution ===");
return 0;
return $ret;
}
sub _load_settings_prompt {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment