mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 05:57:54 +00:00
parallel: Warn if content of --jobs myfile is empty.
This commit is contained in:
parent
61f8b96f43
commit
268507ff25
|
@ -8285,6 +8285,11 @@ sub user_requested_processes($) {
|
||||||
if(open(my $in_fh, "<", $Global::max_procs_file)) {
|
if(open(my $in_fh, "<", $Global::max_procs_file)) {
|
||||||
my $opt_P_file = join("",<$in_fh>);
|
my $opt_P_file = join("",<$in_fh>);
|
||||||
close $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);
|
$processes = $self->user_requested_processes($opt_P_file);
|
||||||
} else {
|
} else {
|
||||||
::error("Cannot open $opt_P.");
|
::error("Cannot open $opt_P.");
|
||||||
|
|
Loading…
Reference in a new issue