Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Wed, 12 Mar 2003 18:24:15 -0500 (EST) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: "Willis, Matthew" cc: cygwin AT cygwin DOT com Subject: RE: cygwin 1.3.20-1 - strange problems with long command lines in nt4 In-Reply-To: Message-ID: Importance: Normal MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 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: 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/