Hello,
Using GNU Parallel 20221122.
In a bash script, I ended up calling something equivalent to the command below and it yielded a confusing error message:
$ env -u PATH -u HOME parallel -k echo ::: A B C
parallel: Warning: $HOME not set. Using /tmp.
parallel: Error: Command line too long (6 >= -1338) at input 0: A
After looking at the source code, it looks like there might be two different things at play here.
And thus instead of measuring the maximum command-line size, it seems it is measuring the maximum filename size? As hinted by what strace shows:
[pid 372756] newfstatat(AT_FDCWD, "ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc", 0x7ffcd0c03a10, 0) = -1 ENAMETOOLONG (File name too long)
Thank you