[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] DaemonTask stacktraced if joined before done



commit a20438efc598cdb5c01d567fe472bd595ce57eb5
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Sun Aug 20 12:36:31 2017 -0700

    DaemonTask stacktraced if joined before done
    
    Pox on my really fast laptop. :P
    
    Now that I'm on a slower system realizing I buggered up the order of joining...
    
      Traceback (most recent call last):
        File "./run_tests.py", line 384, in <module>
          main()
        File "./run_tests.py", line 266, in main
          task.join()  # no-op if these haven't been run
        File "/home/atagar/Desktop/stem/test/task.py", line 209, in join
          self.result = self._background_process.join()
        File "/home/atagar/Desktop/stem/stem/util/system.py", line 265, in join
          response = self._pipe.recv()
      IOError: [Errno 4] Interrupted system call
---
 stem/util/system.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stem/util/system.py b/stem/util/system.py
index e4b2d874..b3b57da9 100644
--- a/stem/util/system.py
+++ b/stem/util/system.py
@@ -262,8 +262,8 @@ class DaemonTask(object):
       self.run()
 
     if self.status == State.RUNNING:
-      response = self._pipe.recv()
       self._process.join()
+      response = self._pipe.recv()
 
       self.status = response[0]
       self.runtime = response[1]



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits