Make --win32 shell bug?

Town, Brad btown@ceddec.com
Thu Oct 19 11:25:00 GMT 2000


Attached is a patch to winsup/cygwin/spawn.cc -- it's the final piece of the
puzzle.  It and the patches I sent yesterday fix the make --win32/cmd.exe
problem.

Details:
When you provide both the first and second parameters to CreateProcess, it
doesn't use the search path to find the executable.  It wasn't finding
cmd.exe because it didn't have a path specified.

This appears to be a problem for cygwin only when attempting to spawn/exec
"cmd.exe /c ..." in spawn_guts.  I added a call to SearchPath for this case
to find the full path to the executable.

Brad Town

PS  Anyone else having problems with today's sources from CVS?  I'm getting
stack dumps all the time with make, bash, etc.  I guess I may have to
actually learn how to extract earlier versions from CVS.  :)


> Attached are two patches to avoid the stackdump with 
> make-3.79.1-1 and the
> Makefile I was using to test them.
> 
> The patch to job.c fixes the access violation; the patch to 
> function.c fixes
> a tiny bug when nothing is read into the buffer but later 
> code assumes it's
> a null-terminated string.
> 
> Note that it still doesn't work 100%:
> 
> make: cmd.exe: Command not found
> make: Nothing to be done for `all'.
> 
> Anyone else want to help?
> 
> Brad Town
> 
> 
> > On Wed, Oct 18, 2000 at 08:55:27AM +0200, Axel Kittenberger wrote:
> > >Hi,
> > >
> > >the
> > >-----------------------------------------
> > >OBJLST := $(shell echo hello)
> > >-----------------------------------------
> > >was originally one line, only out of some reason my mailer 
> > thought it's
> > >better to devide it ;) (hope this time it work's)
> > >
> > >yes i was running make 3.79-3, since the version number 
> felt somehow
> > >"higher", however i downloaded now 3.79.1-1, but the stack 
> > error remains the
> > >same....
> > >
> > >Well running in the bash shell invoking make without --win32 works
> > >correctly, but starting it from a DOS-BOX with --win32 
> > yields me to that stack dump
> > >:(
> > 
> > Oops.  Today I *can* duplicate it.  I must not have been 
> > adding --win32
> > yesterday.
> > 
> > Anyway, if you would like to submit a patch to fix this 
> behavior, I'll
> > release a new version of make.
> > 
> > cgf

-------------- next part --------------
A non-text attachment was scrubbed...
Name: spawn.cc.diff
Type: text/x-diff
Size: 995 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20001019/a42788a1/attachment.bin>


More information about the Cygwin mailing list