in reply to Re^2: Fork and exec
in thread Fork and exec

Windows has no fork but it can be emulated. See perlfork. Over on the perldoc for perlport I see that system(1, @args) will spawn an external process without waiting for the child to terminate.

Disclaimer: I don't do windows.

Replies are listed 'Best First'.
Re^4: Fork and exec
by perlmonkdr (Beadle) on May 02, 2008 at 20:34 UTC

    Well guys i post the solution for this isuee

    When i think in execute multiple files without wait i say, ok, i need use childs

    Anyway the solution come more simple, like this:

    #!/usr/bin/perl use strict; use warnings; for my $a ( 1..10 ) { print "Exec: $a\n"; # Here I want execute and continue without # wait the status system "perl -e exec('sleep.pl')" ; } print "finish"; exit;

    It's delegate the process to other instance of perl and exist when finish, i check in the system's process table and works ok!!

    system(1, @args) can be but i'm not test

    Thk to all for your help