automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC 03/20] depcomp: use "rmdir", not "rm -rf", to remove the empty lock


From: Stefano Lattarini
Subject: [RFC 03/20] depcomp: use "rmdir", not "rm -rf", to remove the empty lock directory
Date: Thu, 18 Oct 2012 22:40:37 +0200

* lib/depcomp (pgcc): Here.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 lib/depcomp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/depcomp b/lib/depcomp
index 76ad09f..6cbc50f 100755
--- a/lib/depcomp
+++ b/lib/depcomp
@@ -356,7 +356,7 @@ pgcc)
   # problems in parallel builds.  Use a locking strategy to avoid stomping on
   # the same $tmpdepfile.
   lockdir=$base.d-lock
-  trap "echo '$0: caught signal, cleaning up...' >&2; rm -rf $lockdir" 1 2 13 
15
+  trap "echo '$0: caught signal, cleaning up...' >&2; rmdir $lockdir" 1 2 13 15
   numtries=100
   i=$numtries
   while test $i -gt 0 ; do
@@ -366,7 +366,7 @@ pgcc)
       "$@" -MD
       stat=$?
       # Release the lock.
-      rm -rf $lockdir
+      rmdir $lockdir
       break
     else
       ## the lock is being held by a different process,
-- 
1.8.0.rc2.11.gd25c58c




reply via email to

[Prev in Thread] Current Thread [Next in Thread]