Run a external program with specified max running time
Posted
by jack
on Stack Overflow
See other posts from Stack Overflow
or by jack
Published on 2010-06-06T11:09:21Z
Indexed on
2010/06/06
11:12 UTC
Read the original article
Hit count: 279
I want to execute an external program in each thread of a multi-threaded python program.
Let's say max running time is set to 1 second. If started process completes within 1 second, main program capture its output for further processing. If it doesn't finishes in 1 second, main program just terminate it and start another new process.
How to implement this?
© Stack Overflow or respective owner