NYCPHP Meetup

NYPHP.org

[nycphp-talk] pausing a script...or something

Marc Antony Vose suzerain at suzerain.com
Tue Aug 12 18:10:35 EDT 2003


Hi there.

I've got a script that's calling another PHP script which creates a 
TAR archive of some files, then it copies it somewhere, and extracts 
it.

Simple enough.

The thing is, the TAR archive is around 178 MB, so it's kinda on the big side.

So, I have a simple question.

Currently, I am building the command to tar the files, and calling it 
like this:

$cmd = "php -q /some/other/directory/maketar,php &";
if( system($cmd) === false){
  die( "was not able to call the TAR building script");
}
else{
  // do other stuff, like copy it and extract it
}

So, my question is...is the above if then construct sufficient to 
make the calling script wait for the PHP script it is making use of 
before it goes on and attempts to copy the created file.

I'm asking this because, to me, it doesn't seem to be, and I want to 
figure out the "proper" way I can make the script wait for the 
completion of the other script.

-- 
Marc Antony Vose
http://www.suzerain.com/

Into every tidy scheme for arranging the pattern of human life, it is 
necessary to inject a certain dose of anarchism.
-- Bertrand Russell



More information about the talk mailing list