Changes: https://savannah.gnu.org/forum/forum.php?forum_id=7581 PR: ports/178039 Submitted by: Chris Howey <howeyc@gmail.com> (maintainer)
29 lines
1.1 KiB
Plaintext
29 lines
1.1 KiB
Plaintext
--- ./src/parallel.orig 2013-04-21 21:50:21.000000000 -0500
|
|
+++ ./src/parallel 2013-04-21 21:56:46.000000000 -0500
|
|
@@ -5072,21 +5072,14 @@
|
|
# 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::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) {
|
|
- $Limits::Command::line_max_len = $opt::max_chars;
|
|
- } else {
|
|
+ if($opt::max_chars > $Limits::Command::line_max_len) {
|
|
::warning("Value for -s option ",
|
|
"should be < $Limits::Command::line_max_len.\n");
|
|
+ } else {
|
|
+ $Limits::Command::line_max_len = $opt::max_chars;
|
|
}
|
|
- } else {
|
|
- $Limits::Command::line_max_len = real_max_length();
|
|
}
|
|
}
|
|
return $Limits::Command::line_max_len;
|