mgperl has asked for the wisdom of the Perl Monks concerning the following question:
I need to run an external batch script from a Perl script to automate some testing I'm performing. This batch script monitors a directory for changes (files added, deleted, modified) and updates a web server accordingly (installing an application added to the folder, for example). When I call the batch script using system(), it starts monitoring the directory, but it doesn't allow me to proceed onto the next statement in my script (which is to copy a file into the directory) until the monitoring ends.
I suppose I need a separate process or thread to run which waits until the batch script is run and finished setting up the monitoring before copying a file into the monitored directory. I'm not sure what the best way to approach this is and I need a technique that works on both Linux and Windows.
Any suggestions?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Copying a file while running an external batch script
by moritz (Cardinal) on Jul 07, 2008 at 14:18 UTC | |
|
Re: Copying a file while running an external batch script
by massa (Hermit) on Jul 07, 2008 at 14:24 UTC | |
|
Re: Copying a file while running an external batch script
by Anonymous Monk on Jul 07, 2008 at 14:21 UTC |