Sorry. Please ignore this as a false alarm. Here is an update. It does not occur
anymore even with my new cygwin path and got fixed as follows. I could isolate this
problem by getting rid of .profile which was same as .bashrc.
My bash script is too big to be emailed. I could not spend time to minimize it to
reproduce this problem, It is not so easy to minimize and reproduce this problem,
since it has something to do with timing issues.
It is a very complex script that has several commands as follows and starts lots of
applications using bash to run in different dos windows. This runs several
applications simultaneously during the start-up and all these are running .bashrc and
.profile at the same time. I guess that's probably why this causes this resource
unavailable problem, since all these myapp-commands use cp, ls, chmod very frequently.
+ cmd /c start cmd /c bash -c 'cmd /c title myapp1; unset CYGENV;. .bashrc; myapp1'
+ cmd /c start cmd /c bash -c 'cmd /c title myapp2; unset CYGENV;. .bashrc; myapp2'
+ cmd /c start cmd /c bash -c 'cmd /c title myapp3; unset CYGENV;. .bashrc; myapp3'
CYGENV is defined in $HOME/.bashrc as follows, just not to run it multiple times. It
has lots of code.
if [ "$CYGENV" = "" ]
then
export CYGENV=y
.... [deleted]...
fi
I had a copy of .profile same as .bashrc in my /home/Administrator and I removed the
.profile now and then this problem went away. I had some trouble with the new cygwin,
that does not automatically run this .bashrc when I login and so I made a copy of this
into .profile to make it work and this caused this problem. With this, my script
works, but I have to run .bashrc specially when I start a new bash window.
c:/cygwin/cygwin.bat and the start-up script used by the launch command is one of the
changes that I noticed between old and new cygwins and I had modified it to make it
work. I could resolve it. Thanks to Jim Drash for following up.
-SN
-----Original Message-----
From: Satya Nemana
Sent: Wednesday, May 01, 2002 12:42 PM
To: [EMAIL PROTECTED]
Subject: Resource temporarily unavailable - bash fails but works with
old versions
I have a bash shell script that I run to test my software. It normally runs OK with
old cygwin downloads.
But when I downloaded my cygwin with the latest till date and ran my bash scripts, I
started getting this peculiar error "Resource temporarily unavailable" for almost
every cygwin command used in my script as follows.
bash: /usr/bin/cp: Resource temporarily unavailable
bash: /usr/bin/chmod: Resource temporarily unavailable
bash: /usr/bin/rm: Resource temporarily unavailable
My BASH version that is latest till date and fails like above, is as follows:
$ bash --version
GNU bash, version 2.05a.0(3)-release (i686-pc-cygwin)
Copyright 2001 Free Software Foundation, Inc.
I switched over to my old cygwin by simply renaming my old c:/cygwin.old directory to
default the c:/cygwin, then my bash script works OK as usual.
I suspect that the latest cygwin has some problem. Any one has any clues?
I scanned all with McAffee and found no virus traces. I also remember that when I
tried to download the latest cygwin, it prompted me to update the setup.exe, which I
downloaded the latest from cygwin home page.
-SN
--
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/