This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: cygwin 1.3.20-1 - strange problems with long command lines in nt4


On Wed, 12 Mar 2003, Willis, Matthew wrote:

> > Igor wrote:
> > You may be hitting the command-line limit with bash.  Try the above with
> > cmd.exe.  See below.
> >> c:\cygwin\bin\echo.exe %PATH%        -- works fine
> >> c:\cygwin\bin\echo.exe %PATH%%PATH%  -- fails, immediately returns to
> command line
> >
> >Try stracing the last line above...
> >       Igor
>
> I can replicate the behavior in cmd.exe; strace returns a zero byte file.
>
> C:\>c:\cygwin\bin\strace.exe -o foo.txt c:\cygwin\bin\echo.exe %PATH%
> C:\texmf\miktex\bin;C:\WINNT\system32;C:\WINNT;c:\FpAddin;c:\FpAddinLon;C:\w
> in32
> app\Sybase\DLL;C:\win32app\Sybase\BIN;C:\FpAddin;C:\OptexNT\vendordll;C:\Opt
> exNT
> \dll;C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program
> File
> s\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft
> Visual S
> tudio\Common\Tools;C:\Program Files\Microsoft Visual Studio\VC98\bin
>
> C:\>c:\cygwin\bin\wc.exe foo.txt
>     269    2712   27213 foo.txt
>
> C:\>c:\cygwin\bin\strace.exe -o foo.txt c:\cygwin\bin\echo.exe %PATH%%PATH%
>
> C:\>c:\cygwin\bin\wc.exe foo.txt
>       0       0       0 foo.txt
>
> Interestingly, I /can/ pass long command lines with bash to programs built
> using vc++. I built a test prog (myecho.exe) using vc++,
>
> /* myprog.c */
> int main(int argc, char* argv[])
> {
>   for (int i=0;i<argc; i++) printf("%s ",argv[i]);
>   printf("\n");
>   return 0;
> }
>
> which will run when I pass long arguments using bash.exe as my shell. I can
> also pass long arguments to this program under cmd.exe. The only difference
> seems to be that bash.exe fully expands argv[0] to the full win32 path name
> and cmd.exe leaves it as myecho.exe. In both cases I was able to use command
> lines over 2000 bytes long without problems.

Matt,

Just got another idea.  See if this helps:
<http://cygwin.com/cygwin-ug-net/using-specialnames.html#AEN733>
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha at cs dot nyu dot edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor at watson dot ibm dot com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
  -- /usr/games/fortune


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]