Chris Devers wrote:
On Sun, 28 May 2006, David Cantrell wrote:
if instead you're doing something like ...
system('open', '/Applications/Acrobat.app');
then you'll need to:
wait around until Acrobat appears in the process table;
wait around until that PID disappears;
Really??
In my experience, the `open` command immediately returns control to the
controlling process (the shell, or whatever else invoked it (pine etc))
without waiting for the `open`ed application to finish, or for that
matter even to finish launching.
Yes, and that is why I said you need to:
wait around until Acrobat appears in the process table
because you can't guarantee that it'll be there when 'open' returns
control to your perl program - 'open' will have fork()ed and exited but
won't necessarily have exec()ed by then. And that you need to then
wait around until that PID disappears
because, erm, it's running in parallel to your program. Do try to keep
up old chap :-)
--
David Cantrell | Benevolent Dictator Of The World
When one has bathed in Christ there is no need to bathe a second time
-- St. Jerome, on why washing is a vile pagan practice