Use Popen.communicate() instead of read() in stacktrace_handler_test.py.
authorSkye Wanderman-Milne <skyewm@google.com>
Mon, 29 Jan 2018 22:40:07 +0000 (14:40 -0800)
committerTensorFlower Gardener <gardener@tensorflow.org>
Mon, 29 Jan 2018 22:45:38 +0000 (14:45 -0800)
commita807755db184c2d2c3b9bcca65457e9915508650
tree18c9af403740672f327f7df28b4e3f9e044ea57e
parentc7351055a89b90c3114fb4c24f880a947a15352e
Use Popen.communicate() instead of read() in stacktrace_handler_test.py.

This avoids potential deadlock, see the warnings in
https://docs.python.org/2/library/subprocess.html#popen-objects. I
found that enabling the C API caused us to deadlock without this
change.

PiperOrigin-RevId: 183730170
tensorflow/python/platform/stacktrace_handler_test.py