forked from Lainports/freebsd-ports
- Don't use port name in COMMENT Release Notes: http://savannah.gnu.org/forum/forum.php?forum_id=7460 PR: ports/174645 [1] Submitted by: Chris Howey <howeyc@gmail.com> (maintainer)
45 lines
2.1 KiB
Text
45 lines
2.1 KiB
Text
--- ./src/parallel.orig 2012-12-22 14:56:17.000000000 -0600
|
|
+++ ./src/parallel 2012-12-22 14:58:55.000000000 -0600
|
|
@@ -4790,29 +4790,19 @@
|
|
package Limits::Command;
|
|
|
|
# Maximal command line length (for -m and -X)
|
|
-sub max_length {
|
|
- # Find the max_length of a command line and cache it
|
|
- # Returns:
|
|
- # number of chars on the longest command line allowed
|
|
- if(not $Limits::Command::line_max_len) {
|
|
- 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) {
|
|
- $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;
|
|
+sub max_length {
|
|
+ # FreeBSD code:
|
|
+ if(not $Limits::Command::line_max_len) {
|
|
+ $Limits::Command::line_max_len = `getconf ARG_MAX` - 1024;
|
|
+ if ($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";
|
|
+ }
|
|
+ $Limits::Command::line_max_len = $opt::s;
|
|
+ }
|
|
+ }
|
|
+ return $Limits::Command::line_max_len;
|
|
}
|
|
|
|
sub real_max_length {
|