Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Test::Cmd and forking

by chromatic (Archbishop)
on Jul 13, 2004 at 16:49 UTC ( #374061=note: print w/replies, xml ) Need Help??


in reply to Test::Cmd and forking

If you're not terribly worried about resource cleanup, there's always POSIX::_exit():

#!/usr/bin/perl -w use strict; use POSIX (); END { warn "Exiting $$\n"; } die "Couldn't fork\n" unless defined( my $pid = fork() ); if ($pid) { print "Parent is $$, child is $pid\n"; } else { print "Child is $$\n"; POSIX::_exit( 0 ); }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://374061]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2020-12-04 04:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (58 votes). Check out past polls.

    Notices?