awohld has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; my $pid; my $getSite = "/www/cgi-bin/getSite.pl"; my $createCSV = "/www/cgi-bin/createCSV.pl"; my $createXML = "/www/cgi-bin/csv2xml"; my $siteCSV = "/www/cgi-bin/site.CSV"; my $siteXML = "/www/cgi-bin/site.XML"; unless ($pid = fork) { unless (fork) { exec "$getSite"; die "Couldn't run getSite.pl"; exit 0; } exit 0; } waitpid($pid,0); unless ($pid = fork) { unless (fork) { exec "$createCSV"; die "Couldn't run createCSV.pl"; exit 0; } exit 0; } waitpid($pid,0); unless ($pid = fork) { unless (fork) { exec "$createXML $siteCSV $siteXML"; die "Couldn't run create XML File"; exit 0; } exit 0; } waitpid($pid,0);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Waiting for an External Program to Finish Executing
by Aristotle (Chancellor) on Nov 11, 2005 at 05:54 UTC | |
|
Re: Waiting for an External Program to Finish Executing
by Moron (Curate) on Nov 11, 2005 at 10:38 UTC | |
by sgifford (Prior) on Nov 11, 2005 at 17:25 UTC | |
by Moron (Curate) on Nov 14, 2005 at 09:11 UTC | |
by sgifford (Prior) on Nov 14, 2005 at 17:23 UTC | |
by Moron (Curate) on Nov 15, 2005 at 10:00 UTC | |
|