> If the files aren't unlinked on ALRM, when should they be
> unlinked?

Our usage of File::Temp _will_ cleanup the files on destruction, the
problem is an unhandled ALRM will cause the program to terminate
without doing those cleanups.

qpsmtpd-forkserver DOES have an ALRM handler, and it works well:

    $SIG{ALRM} = sub { 
       print $client "421 Connection Timed Out\n";
       ::log(LOGINFO, "Connection Timed Out"); 
       exit; };

The important part of that handler is the C< exit > call.  It allows
normal perl termination and thus cleanup.

I'll bet if you put $SIG{ALRM} = sub { exit; }; in qpsmtpd (which
pperl uses) then 99% of your issues will go away.

-R

Reply via email to