add news item for ikiwiki 2.49
[ikiwiki.git] / ikiwiki-mass-rebuild
index 8cc6f45c1d9f6fbd21b40e403bc3d5561bb93d3e..3d0ca734c4652368c9486e5479ce92279efdb610 100755 (executable)
@@ -33,10 +33,9 @@ sub processline {
        defined(my $pid = fork) or die "Can’t fork: $!";
        if (! $pid) {
                my ($uuid, $ugid) = (getpwnam($user))[2, 3];
-               my $grouplist=join(" ", $ugid, $ugid, supplemental_groups($user));
-               $)=$grouplist;
-               if ($!) {
-                       die "failed to set egid $grouplist: $!";
+               my $grouplist=join(" ", $ugid, sort {$a <=> $b} $ugid, supplemental_groups($user));
+               if (($)=$grouplist) ne $grouplist) {
+                       die "failed to set egid $grouplist (got back $))";
                }
                $(=$ugid;
                $<=$uuid;