-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Corinna Vinschen on 9/12/2005 9:22 AM: >>Even with your recent patches to make cygwin programs receive longer command >>lines, whether or not they are not mounted cygexec, ARG_MAX should still >>reflect >>the worst case limit so that programs (like xargs) that use ARG_MAX will work >>reliably even when invoking non-cygwin programs that are really bound by the >>32k >>limit. > > > I had a short talk with Chris and we both agree that it doesn't make > overly sense to go down to the lowest limit just to accomodate > non-Cygwin applications. Users of those apps can easily use xargs -s > so why penalize Cygwin apps?
Well, for now, xargs in findutils-4.2.25-2 is already hardcoded to 32k max; attempting to use -s to get a larger value will fail, because of the POSIX rules placed on xargs. If, on the other hand, cygwin added pathconf(_PC_ARG_MAX) as a legal extension to POSIX, then xargs could use its preferred 128k default when calling cygwin apps, while using 32k for windows apps without even requiring users to supply -s; not to mention the fact that -s could then be used to obtain larger command lines than even the default 128k for cygwin apps. With that extension in place, sysconf(_SC_ARG_MAX) at 32k is not much of a limit for applications that know about cygwin's extension. Also, the argument brought up on the findutils mailing list was that beyond a certain size, the cost of processing each argument starts to outweigh the benefits of forking fewer tasks, to the point that the difference between a 32k ARG_MAX vs. a 1M ARG_MAX falls in the noise when the same amount of data is divided by xargs to as few runs as possible, so a 32k limit is not really penalizing cygwin apps. But since I have not provided a patch for pathconf(_PC_ARG_MAX), and I do not have copyright assignment, I will be understanding if 1.5.19 is released with _SC_ARG_MAX still broken in the corner cases. Just be aware that xargs will remain at its hardcoded 32k limit unless it can find a way to query cygwin whether a particular executable can be given a larger limit. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDJlES84KuGfSFAYARAu75AJ4r3Zd2U/eFTMzod39mpNn0M8aQigCgySob xk7QutMPTnN3wh/zUMnSMHM= =sw7M -----END PGP SIGNATURE-----
