From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,47a06d19e281eb8d X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,47a06d19e281eb8d X-Google-Attributes: gid1164f8,public X-Google-Thread: 111731,47a06d19e281eb8d X-Google-Attributes: gid111731,public X-Google-Thread: f6134,47a06d19e281eb8d X-Google-Attributes: gidf6134,public X-Google-ArrivalTime: 1994-03-06 21:27:14 PST Xref: gmd.de comp.org.decus:2605 comp.os.vms:41552 comp.sys.dec:13856 comp.unix.advocacy:812 Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!wupost!bcm!cephalo.neusc.bcm.tmc.edu!tso From: tso@cephalo.neusc.bcm.tmc.edu (Dan Ts'o) Newsgroups: comp.org.decus,comp.os.vms,comp.sys.dec,comp.unix.advocacy Subject: Re: Is VMS Dying? Date: 7 Mar 1994 05:27:14 GMT Organization: Baylor College of Medicine, Houston,Tx Distribution: world Message-ID: <2ledvi$pst@gazette.bcm.tmc.edu> References: <2l7ifnINNd1n@jhunix.hcf.jhu.edu>> <2l7pbn$kk9@gap.cco.caltech.edu> NNTP-Posting-Host: cephalo.neusc.bcm.tmc.edu In article <2l7pbn$kk9@gap.cco.caltech.edu> carl@SOL1.GPS.CALTECH.EDU writes: )The point is that the shell technique for expanding wildcards requires that all )instances of the expansion be placed in the argument list. I've yet to see a )shell that didn't have a hard-coded limit to the size of the argument list )(yeah, I know, you don't have to have one; you COULD make a guess as to how )many arguments you're going to generate, malloc space for pointers to them, if )you exceed the estimate, malloc more space, copy the already generated )pointers, and iterate). In most UNIX's, the arg space limit is not truly limited by the shell, but by the kernel. Basically the kernel has to put that arg list somewhere before performing the exec() call. It is data being transfered from the old program image to the new. In PDP-11 days it used to be terribly restricted (I believe it used a filesystem buffer, 512bytes). Most UNIX's these days have limits like 10-20Kb. I suppose a better alternative would be to save the old process memory space while doing the exec and copy the args from that memory to the new address space before destroying the old image. However, then you would end up with situations like having to pagein the args if there were too many, or not being able to exec a 100Mb program from a 100Mb program if your swap space were 120Mb.