parallel: Warn if content of --jobs myfile is empty.

This commit is contained in:
Ole Tange 2023-05-22 00:47:31 +02:00
parent 61f8b96f43
commit 268507ff25

View file

@ -8285,6 +8285,11 @@ sub user_requested_processes($) {
if(open(my $in_fh, "<", $Global::max_procs_file)) {
my $opt_P_file = join("",<$in_fh>);
close $in_fh;
if($opt_P_file !~ /\S/) {
::warning_once("$Global::max_procs_file is empty. ".
"Treated as 100%");
$opt_P_file = "100%";
}
$processes = $self->user_requested_processes($opt_P_file);
} else {
::error("Cannot open $opt_P.");