Killing frozen system("something.exe") call - how?

A

Alexandre Bougakov

Hello,

I am using ActivePerl under Windows. I wrote a small script that
indexes a lot of *.pdf and *.doc files in a given directory using
external parsers.

It finds a file, and calls

system ("${doc2text_path}doc2text.exe -d cp1251 ${filename} >
${temp}output.txt");

the problem is that doc2text.exe "freezes" on some documents. It
outputs the text, but suddently stops, put Perl keeps waiting for it
to finish. I have to kill the script manually, delete the file that
caused the converter to stop and restart it all again.

The question is: can I make Perl to stop waiting for a called external
program to finish after one minute, for example, and than to kill the
frosen app., say "oops.." and to continue with the next commands?

Thanks in advance,
Sanja
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top