bugGNU Parallel - Bugs: bug #37657, FreeBSD patch for max args (-n)

 
 

bug #37657: FreeBSD patch for max args (-n)

Submitter:  None
Submitted:  Thu 01 Nov 2012 03:14:23 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Need Info
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 24 Jan 2013 11:46:37 PM UTC, comment #2: 

Info needed but not received for 2 months => closing bug.

Re-open the bug when the needed info is received.

Ole Tange <tange>
Group administrator
Mon 26 Nov 2012 10:04:57 PM UTC, comment #1: 

The patch seems to break arg max on other platforms.

A patch that does not break other platforms may be accepted.

Ole Tange <tange>
Group administrator
Thu 01 Nov 2012 03:14:23 PM UTC, original submission:  

Since FreeBSD has get_conf ARGS_MAX, might as well use it.

patch currently used by port:

------------
--- ./src/parallel.orig 2012-08-22 21:25:08.000000000 -0500
+++ ./src/parallel 2012-08-22 21:25:24.000000000 -0500
@@ -4571,21 +4571,15 @@
     # Returns:
     #   number of chars on the longest command line allowed
     if(not $Limits::Command::line_max_len) {
+ $Limits::Command::line_max_len = `getconf ARG_MAX` - 1024;
  if($::opt_s) {
-     if(is_acceptable_command_line_length($::opt_s)) {
- $Limits::Command::line_max_len = $::opt_s;
-     } else {
- # -s is too long: Find the correct
- $Limits::Command::line_max_len = binary_find_max_length(0,$::opt_s);
+     if($::opt_s > $Limits::Command::line_max_len) {
+      print STDERR "$Global::progname: ",
+      "you are setting value for -s greater than $Limits::Command::line_max_len\n";
      }
      if($::opt_s <= $Limits::Command::line_max_len) {
  $Limits::Command::line_max_len = $::opt_s;
-     } else {
- ::warning("Value for -s option ",
-   "should be < $Limits::Command::line_max_len.\n");
      }
- } else {
-     $Limits::Command::line_max_len = real_max_length();
  }
     }
     return $Limits::Command::line_max_len;
--------------

Link to latest:
http://www.freebsd.org/cgi/cvsweb.cgi/ports/sysutils/parallel/files/

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by tange (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-01-24 tange Open/ClosedOpen Closed
    2012-11-26 tange StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code