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]

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


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>> 

Attachment: cygcheck.out
Description: Binary data

Attachment: foo.txt
Description: Text document

--
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]