use of POSIX::_exit

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....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,525
Members
44,997
Latest member
mileyka

Latest Threads

Top