in reply to Re: Forking seperate processes?
in thread Forking seperate processes?

I don't need access to it's standard input or input, and exec won't work because I still want the main program to be able to continue doing other stuff.

Replies are listed 'Best First'.
Re^3: Forking seperate processes?
by graff (Chancellor) on Feb 19, 2006 at 05:16 UTC
    Then you probably want to use fork and exec together like this:
    # we're in the "main program"... my $child = fork(); die "fork failed: $!" unless ( defined( $child )); if ( $child == 0 ) { # the child process does this: exec( 'other_program', @args ); } # the parent now goes on to do whatever follows, while the child is ru +nning...