]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
ikiwiki-mass-rebuild: Don't trust $! when setting $)
authorJoey Hess <joey@kodama.kitenet.net>
Sat, 31 May 2008 18:46:16 +0000 (14:46 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Sat, 31 May 2008 18:46:16 +0000 (14:46 -0400)
A better fix, just check that what $) returns is what it was asked to set,
and ignore $! entirely.

debian/changelog
ikiwiki-mass-rebuild

index 788d4b44ae889502e112b6a51bdb905bb90366b4..1f24f75308e91e9eabc10f14f71217fd7555cf74 100644 (file)
@@ -1,7 +1,7 @@
 ikiwiki (2.49) UNRELEASED; urgency=low
 
   * haiku: Generate valid xhtml.
-  * ikiwiki-mass-rebuild: under $! before setting $) to avoid strange errno issue
+  * ikiwiki-mass-rebuild: Don't trust $! when setting $)
 
  -- Joey Hess <joeyh@debian.org>  Fri, 30 May 2008 19:08:54 -0400
 
index 0057beb4f1735f957045adb9ccb1f2893a89bbdc..b40eb0b3b435b95da7d6675904da3e2804684431 100755 (executable)
@@ -34,9 +34,7 @@ sub processline {
        if (! $pid) {
                my ($uuid, $ugid) = (getpwnam($user))[2, 3];
                my $grouplist=join(" ", $ugid, $ugid, supplemental_groups($user));
-               undef $!;
-               $)=$grouplist;
-               if ($!) {
+               if (($)=$grouplist) ne $grouplist) {
                        die "failed to set egid $grouplist: $!";
                }
                $(=$ugid;