O
Oliver
hi - I have a problem where children I spawn via fork will not exit -
see thread 'killing my children'
I have found that this only occurs when my child executes this code:
my $smtp = Net::SMTP->new('mail', Timeout => 60) || die $!;
$smtp->mail($from) or die "net_smtp mail from failed";
$smtp->to($to) or die "net_smtp rcpt to failed";
$smtp->data($data) or die "net_smtp data failed";
$smtp->quit() or die "net_smtp quit failed";
undef($smtp);
exit 0;
I can solve my problem be replacing 'exit 0' with 'POSIX::_exit'
can anyone advise as to whether this is dangerous/horrible ?
any ideas why this is required also appreciate.
I have used Devel::Symdump to look at the symbol table, and see that
there is stuff to do with Net::SMTP hanging around - not sure if that
is to be expected or not....
see thread 'killing my children'
I have found that this only occurs when my child executes this code:
my $smtp = Net::SMTP->new('mail', Timeout => 60) || die $!;
$smtp->mail($from) or die "net_smtp mail from failed";
$smtp->to($to) or die "net_smtp rcpt to failed";
$smtp->data($data) or die "net_smtp data failed";
$smtp->quit() or die "net_smtp quit failed";
undef($smtp);
exit 0;
I can solve my problem be replacing 'exit 0' with 'POSIX::_exit'
can anyone advise as to whether this is dangerous/horrible ?
any ideas why this is required also appreciate.
I have used Devel::Symdump to look at the symbol table, and see that
there is stuff to do with Net::SMTP hanging around - not sure if that
is to be expected or not....