bug-gnulib
[Top][All Lists]
Advanced

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

Re: [Bug-tar] 1.16.1 build hangs in configure


From: Paul Eggert
Subject: Re: [Bug-tar] 1.16.1 build hangs in configure
Date: Thu, 29 Mar 2007 14:59:28 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Jeff Blaine <address@hidden> writes:

> Red Hat Linux v3
> GCC 3.2.3 (as provided with above)
>
> ...
> checking whether getcwd handles long file names properly...
>
> Sits there forever.

It shouldn't actually sit there forever.  Just for a very long time.

> Here's a strace of the looping conftest binary:
>
> jblaine:hebron> strace -p 11234
> Process 11234 attached - interrupt to quit
> chdir("..")                             = 0
> rmdir("confdir3")                       = -1 ENOTEMPTY (Directory not empty)
> chdir("..")                             = 0
> rmdir("confdir3")                       = -1 ENOTEMPTY (Directory not empty)
> ...

Well, something obviously went wrong.  There's no point for the test
to keep trying to remove a parent when it can't remove the child, so
we might as well give up in that case.

I installed the following patch into gnulib.  Thanks for reporting it.

2007-03-29  Paul Eggert  <address@hidden>

        * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Don't bother to
        try to remove a parent directory if the child couldn't be removed
        (except for the first rmdir, which could fail because the child
        doesn't exist).  Problem reported by Jeff Blaine in
        <http://lists.gnu.org/archive/html/bug-tar/2007-03/msg00014.html>.

Index: m4/getcwd-path-max.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/getcwd-path-max.m4,v
retrieving revision 1.9
diff -u -p -r1.9 getcwd-path-max.m4
--- m4/getcwd-path-max.m4       3 Jul 2006 08:32:46 -0000       1.9
+++ m4/getcwd-path-max.m4       29 Mar 2007 21:57:50 -0000
@@ -1,4 +1,4 @@
-#serial 12
+#serial 13
 # Check for several getcwd bugs with long file names.
 # If so, arrange to compile the wrapper function.

@@ -6,7 +6,7 @@
 # I've heard that this is due to a Linux kernel bug, and that it has
 # been fixed between 2.4.21-pre3 and 2.4.21-pre4.  */

-# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -163,7 +163,8 @@ main ()
       {
        if (chdir ("..") < 0)
          break;
-       rmdir (DIR_NAME);
+       if (rmdir (DIR_NAME) != 0)
+         break;
       }
   }





reply via email to

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