From: Cédric Aguerre Date: Wed, 2 Mar 2016 12:34:50 +0000 (+0100) Subject: Make select non blocking X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5f9efcefb72aec8cec9012d3286ed4bd1219a574;p=modules%2Fyacs.git Make select non blocking --- diff --git a/bin/runTests.py b/bin/runTests.py index f2695127f..a56dfd7ea 100644 --- a/bin/runTests.py +++ b/bin/runTests.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2015, 2016 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -82,7 +82,7 @@ def __runTest(command, workdir): while True: reads = [p.stdout.fileno(), p.stderr.fileno()] - ret = select.select(reads, [], []) + ret = select.select(reads, [], [], 0) for fd in ret[0]: if fd == p.stdout.fileno(): @@ -97,7 +97,8 @@ def __runTest(command, workdir): pass pass - if p.poll() != None: + returncode = p.poll() + if not returncode is None: break pass