bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #31424] _SC_ARG_MAX is unreliable on Interix


From: James Youngman
Subject: [bug #31424] _SC_ARG_MAX is unreliable on Interix
Date: Sat, 23 Oct 2010 11:37:41 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/533.2 (KHTML, like Gecko) Chrome/5.0.342.7 Safari/533.2

URL:
  <http://savannah.gnu.org/bugs/?31424>

                 Summary: _SC_ARG_MAX is unreliable on Interix
                 Project: findutils
            Submitted by: jay
            Submitted on: Sat Oct 23 11:37:40 2010
                Category: xargs
                Severity: 3 - Normal
              Item Group: Wrong result
                  Status: None
                 Privacy: Public
             Assigned to: jay
         Originator Name: Markus Duft
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: None
           Fixed Release: None

    _______________________________________________________

Details:

I recently updated my findutils builds on interix (work without
any patches (except a gnulib patch i already submitted), thanks
for the great work ;) ), and stumbled across a small problem:

mduft xargs $ find /usr/ | ./xargs
./xargs: /bin/echo: Cannot allocate memory

mduft xargs $ ./xargs --show-limits
Your environment variables take up 3119 bytes
POSIX upper limit on argument length (this system): 1043409
POSIX smallest allowable upper limit on argument length (all systems): 4096
Maximum length of command we could actually use: 1040290
Size of command buffer we are actually using: 131072


It seems that max argument length is too high...

Now, i'm pretty aware that interix is doing _many_ things wrong, and
sysconf(_SC_ARG_MAX) may well return a much too high number, but to
consistently handle such cases, would it be wise to cap the max argument
length to a sane value in xargs?





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?31424>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]