in reply to Re^2: Win32 Processes...capturing output and timing out
in thread Win32 Processes...capturing output and timing out

No clean way that I know of, to kill a thread.

Here is a link to some PM discussion of a usable, but ugly option.

     "There are only two truly infinite things. The universe and stupidity, and I'm not too sure about the universe"- Albert Einstein

  • Comment on Re^3: Win32 Processes...capturing output and timing out

Replies are listed 'Best First'.
Re^4: Win32 Processes...capturing output and timing out
by keydet89 (Initiate) on Apr 22, 2005 at 11:19 UTC
    All,

    I came up with a solution...not the prettiest, but it works.

    First, create a wrapper for launching executables, using Win32::Job. Use Win32::Job's run() function to implement the timeout. Launch this wrapper from the main application, which captures the output.

    The use of Win32::Job limits this to the Win2K+ platforms...but for now, that's not really a big issue.

    Thanks!