
rovf
Veteran
Mar 27, 2010, 9:04 AM
Post #13 of 14
(629 views)
|
|
Re: [hem] system command to run a application
[In reply to]
|
Can't Post
|
|
Don't really the answer for your question, but maybe helpful too: I don't use Win32::Process for this, but a special feature of the system command (passing the magical integer '1' as first parameter), for instance: $pid = system(1, $cmd); This starts $cmd as separate process. To check whether the process has been ended, use use POSIX qw( WNOHANG ); $program_finished=waitpid($pid, WNOHANG); To kill the process, use kill(-9,$pid) or, if you are gentle, send first signal 15 to give the process the chance to save the file, and fire with -9 if the process decided to ignore you.
|