diff --git a/doc/release_new_version b/doc/release_new_version index 0e596372..bb9bd81a 100644 --- a/doc/release_new_version +++ b/doc/release_new_version @@ -201,30 +201,13 @@ cc:Sandro Cazzaniga , Ryoichiro Suzuki , Jesse Alama -Subject: GNU Parallel 20130922 ('Manning') released +Subject: GNU Parallel 20131022 ('Westgate') released -GNU Parallel 20130922 ('Manning') has been released. It is +GNU Parallel 20131022 ('Westgate') has been released. It is available for download at: http://ftp.gnu.org/gnu/parallel/ -This release has no new features, and very few changes, making it a -good candidate for a stable release. - New in this release: -* PDF-files of documentation is now included. - -* Cloning at warp speed 100 VMs in 1 minute using one command line - http://www.beebotech.com.au/tag/command-line/ - -* Calcul Quebec's introduction to GNU Parallel - https://wiki.calculquebec.ca/w/GNU_parallel - -* Brincando com o GNU parallel - http://blog.tadeucruz.com/2013/09/brincando-com-o-gnu-parallel/ - -* GNU Parallelで並列処理を行う - http://qiita.com/PENGUINANA_/items/af27a833e835fe17f09b - * Bug fixes and man page updates. diff --git a/src/parallel b/src/parallel index c715667e..7ee1cc49 100755 --- a/src/parallel +++ b/src/parallel @@ -5456,21 +5456,28 @@ sub max_length { # Returns: # number of chars on the longest command line allowed if(not $Limits::Command::line_max_len) { + # Disk cache of max command line length + my $len_cache = $ENV{'HOME'} . "/.parallel/tmp/linelen-" . ::hostname(); + my $cached_limit; + if(-e $len_cache) { + open(my $fh, "<", $len_cache) || ::die_bug("Cannot read $len_cache"); + $cached_limit = <$fh>; + close $fh; + } else { + $cached_limit = real_max_length(); + Semaphore::mkdir_or_die($ENV{'HOME'} . "/.parallel/tmp"); + open(my $fh, ">", $len_cache) || ::die_bug("Cannot write $len_cache"); + print $fh $cached_limit; + close $fh; + } + $Limits::Command::line_max_len = $cached_limit; if($opt::max_chars) { - if(is_acceptable_command_line_length($opt::max_chars)) { - $Limits::Command::line_max_len = $opt::max_chars; - } else { - # -s is too long: Find the correct - $Limits::Command::line_max_len = binary_find_max_length(0,$opt::max_chars); - } - if($opt::max_chars <= $Limits::Command::line_max_len) { + if($opt::max_chars <= $cached_limit) { $Limits::Command::line_max_len = $opt::max_chars; } else { ::warning("Value for -s option ", - "should be < $Limits::Command::line_max_len.\n"); + "should be < $cached_limit.\n"); } - } else { - $Limits::Command::line_max_len = real_max_length(); } } return $Limits::Command::line_max_len; diff --git a/src/parallel.pdf b/src/parallel.pdf index 1485433e..bf5fdb0c 100644 Binary files a/src/parallel.pdf and b/src/parallel.pdf differ diff --git a/src/parallel.pod b/src/parallel.pod index 9b794bc8..efc21ad3 100644 --- a/src/parallel.pod +++ b/src/parallel.pod @@ -430,7 +430,7 @@ occurs as a line of input, the rest of the input is ignored. If neither B<-E> nor B<-e> is used, no end of file string is used. -=item B<--delay> I (alpha testing) +=item B<--delay> I (beta testing) Delay starting next job I seconds. GNU B will pause I seconds after starting each job. I can be less than 1 @@ -456,7 +456,7 @@ If I is omitted, there is no end of file string. If neither B<-E> nor B<-e> is used, no end of file string is used. -=item B<--env> I (alpha testing) +=item B<--env> I (beta testing) Copy environment variable I. This will copy I to the environment that the command is run in. This is especially useful for @@ -489,7 +489,7 @@ See also B<--bg>, B. Implies B<--semaphore>. -=item B<--filter-hosts> (alpha testing) +=item B<--filter-hosts> (beta testing) Remove down hosts. For each remote host: check that login through ssh works. If not: do not use this host. @@ -551,7 +551,7 @@ status will be the exit status from the failing job. =back -=item B<--header> I (alpha testing) +=item B<--header> I (beta testing) Use regexp as header. For normal usage the matched header (typically the first line: B<--header '.*\n'>) will be split using B<--colsep> @@ -705,7 +705,7 @@ B<-l 0> is an alias for B<-l 1>. Implies B<-X> unless B<-m>, B<--xargs>, or B<--pipe> is set. -=item B<--line-buffer> (alpha testing) +=item B<--line-buffer> (beta testing) Buffer output on line basis. B<--group> will keep the output together for a whole job. B<--ungroup> allows output to mixup with half a line @@ -774,7 +774,7 @@ This is useful for scripts that depend on features only available from a certain version of GNU B. -=item B<--nonall> +=item B<--nonall> (alpha testing) B<--onall> with no arguments. Run the command on all computers given with B<--sshlogin> but take no arguments. GNU B will log @@ -785,7 +785,7 @@ This is useful for running the same command (e.g. uptime) on a list of servers. -=item B<--onall> +=item B<--onall> (alpha testing) Run all the jobs on all computers given with B<--sshlogin>. GNU B will log into B<--jobs> number of computers in parallel @@ -807,9 +807,9 @@ Instead of printing the output to stdout (standard output) the output of each job is saved in a file and the filename is then printed. -=item B<--pipe> (alpha testing) +=item B<--pipe> (beta testing) -=item B<--spreadstdin> (alpha testing) +=item B<--spreadstdin> (beta testing) Spread input to jobs on stdin (standard input). Read a block of data from stdin (standard input) and give one block of data as input to one @@ -967,7 +967,7 @@ If the stdin (standard input) only contains whitespace, do not run the command. If used with B<--pipe> this is slow. -=item B<--record-env> (alpha testing) +=item B<--record-env> (beta testing) Record current environment variables in ~/.parallel/ignored_vars. This is useful before using B<--env _>. @@ -1015,9 +1015,9 @@ it to the command. Only used with B<--pipe>. -=item B<--results> I (alpha testing) +=item B<--results> I (beta testing) -=item B<--res> I (alpha testing) +=item B<--res> I (beta testing) Save the output into files. The files will be stored in a directory tree rooted at I. Within this directory tree, each command will result @@ -1126,9 +1126,9 @@ B<--return> is ignored when used with B<--sshlogin :> or when not used with B<--sshlogin>. -=item B<--round-robin> (alpha testing) +=item B<--round-robin> (beta testing) -=item B<--round> (alpha testing) +=item B<--round> (beta testing) Normally B<--pipe> will give a single block to each instance of the command. With B<--round-robin> all blocks will at random be written to @@ -1318,9 +1318,9 @@ B<--sshlogin> is often used with B<--transfer>, B<--return>, B<--cleanup>, and B<--trc>. -=item B<--sshloginfile> I (alpha testing) +=item B<--sshloginfile> I (beta testing) -=item B<--slf> I (alpha testing) +=item B<--slf> I (beta testing) File with sshlogins. The file consists of sshlogins on separate lines. Empty lines and lines starting with '#' are ignored. Example: @@ -1412,7 +1412,7 @@ different dir for the files. Setting B<--tmpdir> is equivalent to setting $TMPDIR. -=item B<--timeout> I (alpha testing) +=item B<--timeout> I (beta testing) Time out for command. If the command runs for longer than I seconds it will get killed with SIGTERM, followed by SIGTERM 200 ms @@ -1557,9 +1557,9 @@ Use B<-v> B<-v> to print the wrapping ssh command when running remotely. Print the version GNU B and exit. -=item B<--workdir> I (alpha testing) +=item B<--workdir> I (beta testing) -=item B<--wd> I (alpha testing) +=item B<--wd> I (beta testing) Files transferred using B<--transfer> and B<--return> will be relative to I on remote computers, and the command will be executed in