setuid $user[2] or die "Cannot switch ID to $dmon_id: $!"; setgid $user[3] or die "Cannot switch group for $dmon_id: $!";