#!/usr/software/bin/perl use warnings; use strict; my $sio_cmd = './sio_linux random 100 1k 0 512k 20 1 testfile'; # Create a new process my $proc_cmd = fork(); if (!defined $proc_cmd) { die "Unable to fork: $!"; } elsif ($proc_cmd == 0){ # Child exec($sio_cmd); die "Unable to exec: $!"; } else { # Parent print "\nThe process id is : $proc_cmd \n"; # Do some stuff # Could use waitpid() instead wait(); print "Child exited with: ",$? >> 8,"\n"; }
In reply to Re: Parallel Execution Flows
by cdarke
in thread Parallel Execution Flows
by perlpal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |