Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-Id: <4.3.1.2.20010731103746.0225a5f8@pop.ma.ultranet.com> X-Sender: lhall AT pop DOT ma DOT ultranet DOT com X-Mailer: QUALCOMM Windows Eudora Version 4.3.1 Date: Tue, 31 Jul 2001 10:41:16 -0400 To: "David King" , cygwin AT cygwin DOT com From: "Larry Hall (RFK Partners, Inc)" Subject: Re: version 1.3.2 has bug in correctly returning error code condition on WIN 2000 operating system In-Reply-To: <095401c119cd$363ad560$8a00440a@LONGBERRY> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" At 10:29 AM 7/31/2001, David King wrote: > > > > Hi Christopher, > > > > Where should I report a bug that I've found with the latest version of = > > cygwin? > > > > We've got 7 boxes running cygwin on NT and Windows 2000 boxes without = > > any > > problems with the code below. We've just installed 2 boxes with the = > > latest 1.3.2, one running > > on Windows NT 4.0 and another on Windows 2000. =20 > > > > Both are having problems with the following perl code: > > > > echo -e "submit_random.sh: INFO - No errors found....removing top-level = > > simulation directory\n" > > rm -f *.log *.sum transcript > > > > # remove the SIMOUT directory of passing testcase > > cd .. > > rm -rf "${MOD_HOSTNAME}_$$_${TIME}" = > > <------------------------------------- PROBLEM IS HERE > > > > if (($? !=3D 0)) > > then > > echo -e "submit_random.sh: ERROR - Could not remove PASSING directory = > > ${MOD_HOSTNAME}_$$_${TIME}" > > # don't know why you couldn't do this.....sleep for a while and try = > > it again.... > > sleep 30 > > rm -rf "${MOD_HOSTNAME}_$$_${TIME}" > > exit -1 > > fi > > > > What I am seeing is TWO problems. First is that the rm -rf is NOT going = > > thru for > > some reason. The directory definitly exists and the permissions appear = > > OK as far > > as I can tell. The second problem is that the return code from the = > > command is zero, ie, I=20 > > don't detect any problems with the rm -rf command now working. =20 > > > > All appears to be OK. > > > > Any suggestions? > > Yes. Make sure that nothing else has the file open that you're trying to remove. If something does and its locked, Cygwin queues it for deletion once the lock is freed. In this context, the behavior you describe is expected and "correct". This is a common occurence with Windows unfortunately. BTW, cygwin AT cygwin DOT com is the address of the list, not Chris Faylor personally. This kind of email is proper to send to the list though. Larry Hall lhall AT rfk DOT com RFK Partners, Inc. http://www.rfk.com 118 Washington Street (508) 893-9779 - RFK Office Holliston, MA 01746 (508) 893-9889 - FAX -- 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/