1.3.13 - hangs for "ls *.o" etc. when globbing large number of fi les on cmd line

Willis, Matthew Matthew.Willis@CIBC.ca
Wed Nov 6 12:00:00 GMT 2002


Not sure if this is a bug or not, so here goes:

I was trying to figure out why I was having trouble with nt4 seeming to hang
when I pass a long list of args to a command. The following command works
just fine.

	echo *.o > foo.txt

The above produces a file that is 1918 characters long; no delay. There are
86 files. The following,

	ls *.o 

just hangs and bumps the cpu to 100%. Same deal with 

	ls * 	rm *.o

On the other hand, the following completes instantly:

	ls -lrt

Further, I was able to do this 

	ls [ab]*.o     - this worked

and this,

	ls [c]*.o       - this worked

but not 

	ls [bc]*.o     - this hanged

It seems like if the path args get too long, bad stuff happens. Same thing
happens in tcsh as well as bash. Any ideas? 
I've attached cygcheck.out as well the file "foo.txt", which contains the
list of file names. 

Context: I originally noticed this problem as part of a unix makefile hang.
Part of the "make clean" was to do an "rm *.o". Changing this to "rm
$(OBJS)" didn't work, but changing to "rm $(OBJS1)", "rm $(OBJS2)", and "rm
$(OBJS3)" worked fine.

 <<cygcheck.out>>  <<foo.txt>> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 26469 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20021106/82b1b18e/attachment.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: foo.txt
URL: <http://cygwin.com/pipermail/cygwin/attachments/20021106/82b1b18e/attachment.txt>
-------------- next part --------------
--
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/


More information about the Cygwin mailing list