Simplify the `_child.py` script

We don't really need stdin for anything but passing the entry point and
detaching it seemed to just cause errors on cancellation teardown.
drop_cloudpickle
Tyler Goodlet 2020-07-22 02:02:20 -04:00
parent aa620fe61d
commit efde3a5773
1 changed files with 1 additions and 8 deletions

View File

@ -3,11 +3,4 @@ import trio
import cloudpickle import cloudpickle
if __name__ == "__main__": if __name__ == "__main__":
job = cloudpickle.load(sys.stdin.detach()) trio.run(cloudpickle.load(sys.stdin.buffer))
try:
result = trio.run(job)
cloudpickle.dump(sys.stdout.detach(), result)
except BaseException as err:
cloudpickle.dump(sys.stdout.detach(), err)