in reply to Re: Re: eval and fork: [bad?] magic
in thread eval and fork: [bad?] magic

Okay. So, did you take a look at that recent node that I mentioned earlier? If I read it right, I think it says that if you put the "child" portion of your code into an eval block, it will behave better:
sub qmail_requeue { ... my $pid = fork; ... if (not defined $pid) { &tempfail ("Unable to fork. (#4.3.0) - $!"); } elsif ($pid == 0) { # In child. PUT THIS PART IN AN EVAL BLOCK eval { close EIN; ... } } else { # in parent ...
But as I mentioned in one of my replies on that other thread, I am (like you) not conversant with using fork from within an eval block -- check that thread for yourself, and good luck!