preston@felix.UUCP (Preston Bannister) (11/15/87)
Has anyone out there implemented a version of the system() library routine that uses the Mark Williams/Beckmeyer scheme for passing long argument lists? Unfortunately, the system() routine in the Mark Williams library does not. The argument list gets truncated after 127 characters. I am using the modified version of the 'make' program posted to this group some time ago. Some of my makefiles want to pass long argument lists (usually on the step linking together a program). The argument list gets chopped off at 127 characters, which is somewhat annoying. -- Preston L. Bannister USENET : ucbvax!trwrb!felix!preston BIX : plb CompuServe : 71350,3505 GEnie : p.bannister
dag@chinet.UUCP (11/17/87)
In article <13021@felix.UUCP> preston@felix.UUCP (Preston Bannister) writes: > >Has anyone out there implemented a version of the system() library >routine that uses the Mark Williams/Beckmeyer scheme for passing long >argument lists? > >Unfortunately, the system() routine in the Mark Williams library does >not. The argument list gets truncated after 127 characters. > Not true! The Mark Williams library DOES use the environment scheme for system()... It calls up the shell, msh.prg, and msh calls up the command. If you are getting truncated command lines, something is screwing around with the "ARGV" or "IOVECT" environment string and the runtime startup is not finding the parameters in the environment. If you know were the file you wish to execute is, you can use "execve", this leaves out the overhead of an extra copy of the shell. This also assumes that you have expanded any wildcards yourself and don't intend to use any built-in shell commands. The version of "make" used in the MWC package uses the library "system" call, and I have made libc.a from that make with one gigantic list of object modules (well over 200 files). >I am using the modified version of the 'make' program posted to this >group some time ago. Some of my makefiles want to pass long argument >lists (usually on the step linking together a program). The argument >list gets chopped off at 127 characters, which is somewhat annoying. If there is enough demand, I will post a "micro-msh" that I use on 520 STs from Make which does no wildcards or built-ins, and calls up msh for anything it can't find (or if it detects a wild-card), but it is really ugly (read "bad") code, and I'll want to fix it up. This could be turned into a "system" subroutine that has some more brains. >-- >Preston L. Bannister >USENET : ucbvax!trwrb!felix!preston >BIX : plb >CompuServe : 71350,3505 >GEnie : p.bannister -- Daniel A. Glasser ----------------------------------------+---------------------------- Cheese is not a discipline! | ...!ihnp4!chinet!dag | ...!ihnp4!mwc!gorgon!dag | ...!ihnp4!chinet!gorgon!dag Disclaimer: I assume full responsibility for my opinions. If my employer knew of some of them, I'd be unemployed.