use of POSIX::_exit

Discussion in 'Perl Misc' started by Oliver, Jun 9, 2004.

  1. Oliver

    Oliver Guest

    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....
     
    Oliver, Jun 9, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bryan

    os._exit vs. sys.exit

    Bryan, Jul 29, 2005, in forum: Python
    Replies:
    4
    Views:
    710
    Peter Hansen
    Jul 29, 2005
  2. Spiros Bousbouras

    _Exit() and signal handlers

    Spiros Bousbouras, Jun 26, 2007, in forum: C Programming
    Replies:
    1
    Views:
    368
    Richard Bos
    Jun 26, 2007
  3. Perry Johnson
    Replies:
    3
    Views:
    1,749
    Perry Johnson
    Dec 11, 2010
  4. john.swilting

    use POSIX qw(ceil floor)

    john.swilting, Apr 21, 2007, in forum: Perl Misc
    Replies:
    2
    Views:
    170
    john.swilting
    Apr 26, 2007
  5. Thomas Blabb
    Replies:
    5
    Views:
    161
    Tad J McClellan
    Dec 13, 2007
Loading...

Share This Page