program hangs when external process crashes

Discussion in 'Python' started by Earl Eiland, Mar 18, 2005.

  1. Earl Eiland

    Earl Eiland Guest

    I'm executing WinRK.exe in a loop using the following code:

    for x in Files:
    Command_String = 'C:\Program Files\WinRK\WinRK.exe -create ' +
    os.path.join(InputDirectory, os.path.splitext(x)[0]) + ' -set
    compression_method ppmz -setg include_paths none -add ' +
    os.path.join(InputDirectory, x) + ' -apply -quit'
    PROC = subprocess.Popen(Command_String)
    PROC.wait()

    Occasionally, WinRK crashes, and this program hangs at PROC.wait().
    What can I do about this?

    Earl Eiland
    Earl Eiland, Mar 18, 2005
    #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. Alexander Widera

    process.start() program hangs

    Alexander Widera, May 22, 2006, in forum: ASP .Net
    Replies:
    6
    Views:
    6,208
    Alexander Widera
    May 31, 2006
  2. Earl Eiland
    Replies:
    0
    Views:
    370
    Earl Eiland
    Mar 19, 2005
  3. ckkart
    Replies:
    4
    Views:
    949
    ckkart
    Nov 27, 2008
  4. Tim Shadel

    Gem hangs => TCPSocket.write hangs

    Tim Shadel, Jul 23, 2005, in forum: Ruby
    Replies:
    1
    Views:
    381
    Ville Mattila
    Jul 24, 2005
  5. RBCS
    Replies:
    1
    Views:
    137
    A. Sinan Unur
    Feb 14, 2006
Loading...

Share This Page