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

Discussion in 'Perl Misc' started by Alexandre Bougakov, Aug 22, 2003.

  1. 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
     
    Alexandre Bougakov, Aug 22, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Petros
    Replies:
    0
    Views:
    3,218
    Petros
    Aug 20, 2003
  2. est
    Replies:
    1
    Views:
    554
  3. LC Geldenhuys
    Replies:
    5
    Views:
    260
    Robert Klemme
    Feb 18, 2004
  4. Martin aus Chemnitz

    Killing a Process started with Kernel.system

    Martin aus Chemnitz, May 24, 2005, in forum: Ruby
    Replies:
    5
    Views:
    156
  5. Laurent Claessens

    Killing threads, and os.system()

    Laurent Claessens, Jan 31, 2012, in forum: Python
    Replies:
    8
    Views:
    356
    Paul Rubin
    Feb 3, 2012
Loading...

Share This Page