ikiwiki-mass-rebuild: under $! before setting $) to avoid strange errno issue

This fixes a problem sgran saw on alioth. Apparently nss-db sets errno to
ENOENT as a side effect trying to read an optional file, but succeeds
anyway. Then, somehow, errno remains set across the library calls made by
$).

So unset it first as a workaround; there's probably a nss-db, libc, and/or
perl bug underneath.
master
Joey Hess 2008-05-31 14:36:15 -04:00
parent 0a35e8a352
commit c00890a2f0
2 changed files with 2 additions and 0 deletions

1
debian/changelog vendored
View File

@ -1,6 +1,7 @@
ikiwiki (2.49) UNRELEASED; urgency=low
* haiku: Generate valid xhtml.
* ikiwiki-mass-rebuild: under $! before setting $) to avoid strange errno issue
-- Joey Hess <joeyh@debian.org> Fri, 30 May 2008 19:08:54 -0400

View File

@ -34,6 +34,7 @@ sub processline {
if (! $pid) {
my ($uuid, $ugid) = (getpwnam($user))[2, 3];
my $grouplist=join(" ", $ugid, $ugid, supplemental_groups($user));
undef $!;
$)=$grouplist;
if ($!) {
die "failed to set egid $grouplist: $!";