This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
RE: cygwin 1.3.20-1 - strange problems with long command lines in nt4
- From: "Willis, Matthew" <Matthew dot Willis at CIBC dot ca>
- To: "'cygwin at cygwin dot com'" <cygwin at cygwin dot com>
- Date: Wed, 12 Mar 2003 13:00:58 -0500
- Subject: RE: cygwin 1.3.20-1 - strange problems with long command lines in nt4
> 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.
--
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/