Merge branch 'master' of ssh://git.ikiwiki.info
authorJoey Hess <joey@kitenet.net>
Mon, 5 Dec 2011 19:17:53 +0000 (15:17 -0400)
committerJoey Hess <joey@kitenet.net>
Mon, 5 Dec 2011 19:17:53 +0000 (15:17 -0400)
IkiWiki/Receive.pm
debian/changelog

index c73adfbbb84b34462eaa474ca315570aba85cc44..5908e09f953ad09cb576cae6c956230be497d6df 100644 (file)
@@ -35,10 +35,17 @@ EOF
                        }
                        "u != $uid";
                } @{$config{untrusted_committers}}).
-               ") exit(0);\n";
+               ") {\n";
 
        
        $ret.=<<"EOF";
+                       /* Trusted user.
+                        * Consume all stdin before exiting, as git may
+                        * otherwise be unhappy. */
+                       char buf[256];
+                       while (read(0, &buf, 256) != 0) {}
+                       exit(0);
+               }
                asprintf(&s, "CALLER_UID=%i", u);
                newenviron[i++]=s;
        }
index 0c64875f1d030dbd4129e9d2bdfe22af393a8dd8..ccdeb8300d5c40f19bbbd0098e37be7b840492b0 100644 (file)
@@ -1,3 +1,9 @@
+ikiwiki (3.20111108) UNRELEASED; urgency=low
+
+  * Consume all stdin when rcs_receive short-circuits, to avoid git SIPIPE race.
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 05 Dec 2011 15:14:48 -0400
+
 ikiwiki (3.20111107) unstable; urgency=low
 
   * img: Bugfix to width/height tags for scaled down image when only