parallel: Fixed bug #65807: parallel-20240522: --limit "io N" broken

This commit is contained in:
Ole Tange 2024-06-08 13:31:20 +02:00
parent 7092a9ef45
commit 4984f85997
14 changed files with 38 additions and 36 deletions

View file

@ -4,8 +4,8 @@
Quote of the month:
gnu parallel is amazing
-- Tarun Agarwal @axrawal
--line-buffer, a flag
parallel, now more precise

View file

@ -273,7 +273,7 @@ from:tange@gnu.org
to:parallel@gnu.org, bug-parallel@gnu.org
stable-bcc: Jesse Alama <jessealama@fastmail.fm>
Subject: GNU Parallel 20240522 ('Raisi-IRAN preæsentdt/Tbilisi/Georgia/Eurovision') released
Subject: GNU Parallel 20240622 ('34 counts/(Raisi-IRAN preæsentdt)/spurlock(supersize)') released
GNU Parallel 20240122 ('Frederik X') has been released. It is available for download at: lbry://@GnuParallel:4

View file

@ -601,7 +601,7 @@ _parset_main() {
fi
if [ "$_parset_NAME" = "--version" ] ; then
# shellcheck disable=SC2006
echo "parset 20240522 (GNU parallel `parallel --minversion 1`)"
echo "parset 20240523 (GNU parallel `parallel --minversion 1`)"
echo "Copyright (C) 2007-2024 Ole Tange, http://ole.tange.dk and Free Software"
echo "Foundation, Inc."
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"

View file

@ -605,7 +605,7 @@ _parset_main() {
fi
if [ "$_parset_NAME" = "--version" ] ; then
# shellcheck disable=SC2006
echo "parset 20240522 (GNU parallel `parallel --minversion 1`)"
echo "parset 20240523 (GNU parallel `parallel --minversion 1`)"
echo "Copyright (C) 2007-2024 Ole Tange, http://ole.tange.dk and Free Software"
echo "Foundation, Inc."
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"

View file

@ -601,7 +601,7 @@ _parset_main() {
fi
if [ "$_parset_NAME" = "--version" ] ; then
# shellcheck disable=SC2006
echo "parset 20240522 (GNU parallel `parallel --minversion 1`)"
echo "parset 20240523 (GNU parallel `parallel --minversion 1`)"
echo "Copyright (C) 2007-2024 Ole Tange, http://ole.tange.dk and Free Software"
echo "Foundation, Inc."
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"

View file

@ -601,7 +601,7 @@ _parset_main() {
fi
if [ "$_parset_NAME" = "--version" ] ; then
# shellcheck disable=SC2006
echo "parset 20240522 (GNU parallel `parallel --minversion 1`)"
echo "parset 20240523 (GNU parallel `parallel --minversion 1`)"
echo "Copyright (C) 2007-2024 Ole Tange, http://ole.tange.dk and Free Software"
echo "Foundation, Inc."
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"

View file

@ -570,7 +570,7 @@ _parset_main() {
fi
if [ "$_parset_NAME" = "--version" ] ; then
# shellcheck disable=SC2006
echo "parset 20240522 (GNU parallel `parallel --minversion 1`)"
echo "parset 20240523 (GNU parallel `parallel --minversion 1`)"
echo "Copyright (C) 2007-2024 Ole Tange, http://ole.tange.dk and Free Software"
echo "Foundation, Inc."
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"

View file

@ -601,7 +601,7 @@ _parset_main() {
fi
if [ "$_parset_NAME" = "--version" ] ; then
# shellcheck disable=SC2006
echo "parset 20240522 (GNU parallel `parallel --minversion 1`)"
echo "parset 20240523 (GNU parallel `parallel --minversion 1`)"
echo "Copyright (C) 2007-2024 Ole Tange, http://ole.tange.dk and Free Software"
echo "Foundation, Inc."
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"

View file

@ -601,7 +601,7 @@ _parset_main() {
fi
if [ "$_parset_NAME" = "--version" ] ; then
# shellcheck disable=SC2006
echo "parset 20240522 (GNU parallel `parallel --minversion 1`)"
echo "parset 20240523 (GNU parallel `parallel --minversion 1`)"
echo "Copyright (C) 2007-2024 Ole Tange, http://ole.tange.dk and Free Software"
echo "Foundation, Inc."
echo "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>"

View file

@ -26,7 +26,7 @@
use strict;
use Getopt::Long;
$Global::progname="niceload";
$Global::version = 20240522;
$Global::version = 20240523;
Getopt::Long::Configure("bundling","require_order");
get_options_from_array(\@ARGV) || die_usage();
if($opt::version) {

View file

@ -2794,7 +2794,7 @@ sub check_invalid_option_combinations() {
sub init_globals() {
# Defaults:
$Global::version = 20240522;
$Global::version = 20240523;
$Global::progname = 'parallel';
$::name = "GNU Parallel";
$Global::infinity = 2**31;
@ -7723,7 +7723,7 @@ sub limit($) {
limit=$1;
io_file=$2;
# Do the measurement in the background
((tmp=$(tempfile);
((tmp=$(mktemp || tempfile);
LANG=C iostat -x 1 2 > $tmp;
mv $tmp $io_file) </dev/null >/dev/null & );
perl -e '-e $ARGV[0] or exit(1);
@ -7772,7 +7772,6 @@ sub limit($) {
local %ENV = %env;
$ENV{'SSHLOGIN'} = $self->string();
system($Global::shell,"-c",$self->{'limitscript'});
#::qqx($self->{'limitscript'});
::debug("limit","limit `".$self->{'limitscript'}."` result ".($?>>8)."\n");
return $?>>8;
}

View file

@ -3130,13 +3130,15 @@ The jobs will be run on a list of remote computers.
=item Z<> @I<hostgroups>/
One or more groups this sshlogin belongs to (See
B<--hostgroup>). Multiple groups are separated by '+'. The I<sshlogin>
will always be added to a hostgroup named the same as I<sshlogin>.
One or more groups this sshlogin belongs to. Multiple groups are
separated by '+'. The I<sshlogin> will always be added to a hostgroup
named the same as I<sshlogin>.
If only the I<@hostgroup> is given, only the sshlogins in that
hostgroup will be used. Multiple I<@hostgroup> can be given.
See B<--hostgroup>.
Examples: B<@prod/>, B<@dev+remote/>
@ -3170,17 +3172,18 @@ Examples: B<alice>, B<bob>
=item Z<> :I<password>
Use I<password> for authentication (using B<sshpass>). B<password>
cannot contain space. If I<password> is omitted use B<$SSHPASS>. If
B<:> is omitted use B<ssh>'s default authentication. In this case
login must not require a password (B<ssh-agent> and B<ssh-copy-id> may
help with that).
cannot contain space. If I<password> is omitted, GNU B<parallel> will
use B<$SSHPASS>. If B<:> is omitted use B<ssh>'s default
authentication. In this case login must not require a password
(B<ssh-agent> and B<ssh-copy-id> may help with that).
Examples: B<:mypassword>, B<:>
=item Z<> I<host>
Hostname or IP address of server.
Hostname or IP address of server. (This is what you will use the
most).
Examples: B<server01>, B<10.1.2.3>, B<[2001:470:142:4::a]>,
B<2001:470:142:5::116>.

View file

@ -137,7 +137,7 @@ GetOptions(
"help" => \$opt::dummy,
) || exit(255);
$Global::progname = ($0 =~ m:(^|/)([^/]+)$:)[1];
$Global::version = 20240522;
$Global::version = 20240523;
if($opt::version) { version(); exit 0; }
# Remove -D and --parallel=N
my @s = (grep { ! /^-D$|^--parallel=\S+$/ }

View file

@ -670,7 +670,7 @@ $Global::Initfile && unlink $Global::Initfile;
exit ($err);
sub parse_options {
$Global::version = 20240522;
$Global::version = 20240523;
$Global::progname = 'sql';
# This must be done first as this may exec myself