Matt Sergeant wrote:
> May be a problem with forking

Do you think that this code fragment I see in SpamAssassin.pm should work as
well as your fork code, or could relying on this be part of the problem?

sub init {
  my ($self, $use_user_pref) = @_;

  # Allow init() to be called multiple times, but only run once.
  if (defined $self->{_initted}) {
    # If the PID changes, reseed the PRNG and the DNS ID counter
    if ($self->{_initted} != $$) {
      $self->{_initted} = $$;
      srand;
      $self->{resolver}->reinit_post_fork();
    }
    return;
  }

  # Note that this PID has run init()
  $self->{_initted} = $$;


 -- sidney

Reply via email to