Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > use of POSIX::_exit

Thread Tools

use of POSIX::_exit

Posts: n/a
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";
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....
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Could not use ''; file already in use. M K ASP .Net 11 04-09-2008 11:35 AM
where to use CPLD & where to use FPGA? VHDL 6 03-06-2006 07:27 AM
How do I know when to use the Viewstate and when to use the posted data? :-) Simon ASP .Net 1 11-09-2004 02:32 AM
Can I use XPath or something to a remote Mac or Linux box and just query an xml file, not using web services and use encyrption? jake ASP .Net 0 07-06-2004 02:16 PM
Cannot use the profile "default" because it is in use, not. Firefox 1 07-04-2004 03:41 AM