From: cgf AT bbc DOT com (Christopher Faylor) Subject: Re: @file 2 Mar 1998 19:08:11 -0800 Message-ID: References: Reply-To: cgf AT bbc DOT com To: cygwin32-developers AT cygnus DOT com In article <3 DOT 0 DOT 5 DOT 32 DOT 19980302162624 DOT 00996230 AT pop DOT cygnus DOT com>, Eric Bachalo wrote: >>One last thing: be sure to define a quoting syntax for the contents of >>the file. It's important to be able to pass any command-line option, >>including one containing spaces. > >Shouldn't the quoting syntax be identical to normal MS command line >quoting? I am assuming that this functionality would only be used in the >command.com shell but I guess there is no reason not to use in a bash or >ash, etc. > >I thought I would just push (insert) the file verbatim into the command >line and into the function that separates out the individual args. The >only question I can think of now is how to deal with EOL in the file. My >first thought would be to replace them with a space before pushing. > >I was hoping to avoid path separator conversions, escape character stuff, >etc. which would then force me to have an @FILE_MODE (as opposed to the >MAKE_MODE) environment variable. :) Actually, I think resorting to a file for this kind of thing is really a bad idea. If you use '@' you will have to make sure that it is quoted appropriately for things that use it (mail programs, maybe?) and unquoted in cygwin later on. You will also inevitably have these files cluttering up your /tmp area. I think it would be far better to pass it in memory somehow either using the mechanism I mentioned in spawn_guts, environment variables, or shared memory. -- http://www.bbc.com/ cgf AT bbc DOT com "Strange how unreal VMS=>UNIX Solutions Boston Business Computing the real can be."