[Fakeroot-commits] [SCM] fakeroot branch, upstream, updated. debian/1.14.3-200-gb232f8a

Clint Adams schizo at debian.org
Tue Aug 23 13:05:54 UTC 2011


The following commit has been merged in the upstream branch:
commit d9e8db94780a16854782c2a1b9fc0f4aa71c135b
Author: Clint Adams <schizo at debian.org>
Date:   Thu May 10 14:57:10 2007 +0000

    * Apply patch from Alexey Shabalovskiy to cope with save-files that are named pipes.
    
    git-archimport-id: fakeroot at packages.debian.org--fakeroot/fakeroot--main--0.0--patch-130

diff --git a/debian/changelog b/debian/changelog
index 729a0fc..3330047 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+fakeroot (1.7.1) unstable; urgency=low
+
+  * Apply patch from Alexey Shabalovskiy to cope with save-files
+    that are named pipes.
+
+ -- Clint Adams <schizo at debian.org>  Thu, 10 May 2007 10:54:23 -0400
+
 fakeroot (1.7.0.2) unstable; urgency=low
 
   * Drop shlibs file, as it is no longer necessary.
diff --git a/faked.c b/faked.c
index baad025..1c5d890 100644
--- a/faked.c
+++ b/faked.c
@@ -464,6 +464,22 @@ int save_database(const uint32_t remote)
     roots = "/";
 #endif
 
+  do {
+    int r,fd=0;
+    struct stat s;
+    r=stat(save_file,&s);
+    if (r<0) return 0;
+    if (!(s.st_mode&S_IFIFO)) break;
+    fd=open(save_file,O_WRONLY|O_NONBLOCK);
+    if (fd<0) {
+      sleep(1);
+      continue;
+    }
+    close(fd);
+    break;
+  } while (1);
+
+
   f=fopen(save_file, "w");
   if(!f)
     return 0;
diff --git a/scripts/fakeroot.in b/scripts/fakeroot.in
index 22d8601..687ae37 100755
--- a/scripts/fakeroot.in
+++ b/scripts/fakeroot.in
@@ -71,7 +71,7 @@ while test "X$1" != "X--"; do
     -s)
        shift
        FAKEDOPTS=$FAKEDOPTS" --save-file $1"
-       WAITINTRAP=1
+       [ -p $1 ] || WAITINTRAP=1
        ;;
     -u|--unknown-is-real)
        FAKEDOPTS=$FAKEDOPTS" --unknown-is-real"

-- 
fakeroot



More information about the Fakeroot-commits mailing list