delorie.com/archives/browse.cgi | search |
Sender: | rich AT phekda DOT freeserve DOT co DOT uk |
Message-ID: | <3D05CF74.1D9EA9D6@phekda.freeserve.co.uk> |
Date: | Tue, 11 Jun 2002 11:22:44 +0100 |
From: | Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk> |
X-Mailer: | Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i586) |
X-Accept-Language: | de,fr |
MIME-Version: | 1.0 |
To: | Jim Meyering <jim AT meyering DOT net> |
CC: | djgpp-workers AT delorie DOT com, Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> |
Subject: | Re: Fileutils 4.1 alpha 1 uploaded |
References: | <Pine DOT SUN DOT 3 DOT 91 DOT 1020416090634 DOT 14169D AT is> <87k7r7hnlj DOT fsf AT pixie DOT eng DOT ascend DOT com> |
Reply-To: | djgpp-workers AT delorie DOT com |
Hello. Jim Meyering wrote: > > Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote: [snip] > > That rings a bell: DOS and some versions of Windows won't let you delete > > the directory that's the current directory on some drive, even if you do > > that from another drive. The trick to overcome that is to chdir to the > > root directory on that drive before removing the temporary directory. [snip] > That's why newer tests should all have code like this: > > pwd=`pwd` > tmp=FIXME.$$ > trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 > trap '(exit $?); exit' 1 2 13 15 > > framework_failure=0 > mkdir $tmp || framework_failure=1 > cd $tmp || framework_failure=1 > > ... > > (exit $fail); exit > > I'm sure some of the older test scripts don't do it right. > If you find some, please let me know. Here's a list of tests that don't have this trap magic in fileutils-4.1.8: cp/backup-1 cp/backup-is-src cp/no-deref-link1 cp/no-deref-link2 cp/no-deref-link3 cp/symlink-slash dd/misc ln/sf-1 ls/symlink-slash ls/time-1 mkdir/p-1 mkdir/p-2 mv/hard-link-1 mv/into-self mv/into-self-3 rm/deep-1 rm/f-1 rm/i-1 rm/ir-1 rm/r-3 rm/sunos-1 touch/fifo Bye, Rich =] -- Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |