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";
+ if (($)=$grouplist) ne $grouplist) {
+ die "failed to set egid $grouplist: $!";
}
$(=$ugid;
$<=$uuid;