From 0353882a6608c8cce4a3395f45b47534991d43df Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 31 May 2008 14:46:16 -0400 Subject: [PATCH] ikiwiki-mass-rebuild: Don't trust $! when setting $) A better fix, just check that what $) returns is what it was asked to set, and ignore $! entirely. --- debian/changelog | 2 +- ikiwiki-mass-rebuild | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 788d4b44a..1f24f7530 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Fri, 30 May 2008 19:08:54 -0400 diff --git a/ikiwiki-mass-rebuild b/ikiwiki-mass-rebuild index 0057beb4f..b40eb0b3b 100755 --- a/ikiwiki-mass-rebuild +++ b/ikiwiki-mass-rebuild @@ -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; -- 2.39.5