This is the mail archive of the cygwin@sources.redhat.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]

RE: Bug: Cygwin crashes when bash is called repeatedly from a .ba t file


I found the solution to this problem buried in a very useful Web page written by Steve Chamberlain (sac@cygnus.com).  The URL for the Web page is:
     http://www.cl.cam.ac.uk/m3doc/linux/text/cygwin/faq.txt

The pertinent parts of the Web page follow:
...
Installation
============
...
   For bash, you'll need to create a directory called `/tmp', and put a
copy of `bash.exe' into `/bin/sh.exe' and `/usr/bin/sh.exe'.
...
Bash says that it can't fork (or just hangs) - why ?
====================================================

   Most often this is because it can't find itself in the path.  Make
sure that your path includes the directory where bash lives, before you
start it.

   If you get errors like 'no such file or directory' when you're trying
to run a shell script, which you know is there, then your problem
probably that bash can't find `/bin/sh'.
...


Here is my question:  If this is a known issue, why doesn't the installation GUI go ahead and do the copies for the user?  That would have saved me a lot of grief, and I am sure that other people must encounter the same problem.

Thanks,

   Craig


>  -----Original Message-----
> From: 	Hayes, Craig  
> Sent:	Wednesday, November 29, 2000 6:18 PM
> To:	'cygwin@cygwin.com'
> Cc:	Hayes, Craig; Maksimowicz, Ed (N-DynCorp)
> Subject:	Bug: Cygwin crashes when bash is called repeatedly from a .bat file
> 
> Situation:
> 
> I have a DOS script that has run reliably for over a year.  I had to add some functionality that DOS couldn't support, so I created Unix shell scripts to do the additional functions, then modified the DOS script to execute the Unix shell scripts by using bash.  An example of the addition to the DOS script would be:
>    bash <Unix shell script name> <arguments>
> 
> 
> Result:
> 
> Everything works wonderfully for several hours, but then Cygwin crashes.  The DOS script can no longer call the Unix shell scripts.  I cannot start Cygwin from the desktop icon.  System message boxes appear saying something to the effect that the DLL cannot be initialized (sorry, I didn't write down the exact message).  Apparently some system resource is used up, but I couldn't identify what.  To recover I have to uninstall Cygwin and reboot my machine.  
> 
> 
> Details:
> 
> I was able to reproduce the problem with the script files which are attached to this email.  
> 
> I have included the bash stack dump.
> 
> I installed Cygwin using the installation GUI and the following files which I have copied to my machine: 
> cygwin-1_1_5-4.tar.gz
> bash-2_04-3.tar.gz
> 
> 
> If you know of a work around to this problem, please let me know.
> 
> Thanks.
> 
> Craig Hayes
> Lockheed Martin Corporation
> (719)277-4507  craig.hayes@lmco.com 
> 
> 
>  << File: mainDosScript.bat >> 
> 
>  << File: subUnixScript >> 
> 
>  << File: bash.exe.stackdump >> 
> 
> 

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]