Path: utzoo!attcan!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.unix.questions Subject: Re: tar -r on a diskfile/tar arg too long Keywords: tar -r on disk file Message-ID: <3483@auspex.auspex.com> Date: 15 Jun 90 18:29:58 GMT References: <1342@ziggy.EDU> <3474@auspex.auspex.com> <1650@charon.cwi.nl> Organization: Auspex Systems, Santa Clara Lines: 19 > > although the 4.x C shell can't cope with > > an argument list that big (the Bourne shell doesn't have quite the same > > problem). > >Similar observations apply to Silicon Graphics version of Unix. >A humble guess: the C shell has a hardwired limit somewhere deep in the >sources (a common feature of Unix utilities). I don't know what happend when (as I infer from your message) SGI boosted the max arg list size, but the problem in SunOS is that the C shell has an array of pointers into the arglist, sized proportionally to NCARGS, that it sticks on the stack. Unfortunately, if NCARGS is very large, this creates a humongous array on the stack, which caused some problems. The *correct* fix is to dynamically allocate this array dynamically; the *expedient* fix, given the C shell's internal messiness, was to build in a smaller fixed size for the array, based on the old value of NCARGS.