Disclaimer: this might be totally unrelated to your problem! :) A common source of deadlocks when using the `multiprocessing` module (or anything related to IPC) comes from calling receiving/sending functions that are blocking. Maybe `readline()` is one of these, meaning that it won't return until it receives something, which might never happen in your case after exiting Maya?
A common solution is to wrap the body of the process function (`_listen()` in your case) into an infinite loop and then receive any incoming message only if the inter-process connection is not empty. The infinite loop is exited when the process receives a sentinel/stop message (usually sent from the parent process) to tell it to quit. Not sure if this can be applied to your code though. On 22 February 2017 at 23:22, Marcus Ottosson <[email protected]> wrote: > close_fds isn’t supported on Windows apparently. > > # ValueError: close_fds is not supported on Windows platforms if you redirect > stdin/stdout/stderr # > > DETACHED_PROCESS didn’t work either unfortunately, but it was worth a > shot. I feel it must be related to this somehow. I’ve tried > CREATE_NO_WINDOW and CREATE_NEW_PROCESS_GROUP as well without avail. > > Here’s > <https://msdn.microsoft.com/en-us/library/windows/desktop/ms684863(v=vs.85>.aspx) > all possible creation flags for reference. > > Any other ideas? > > Best, > Marcus > > > -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/python_inside_maya/CAFRtmOATTheY4DsCQbrLugUQxJgq7 > OSyNdHTUY%3Db%3DWvU1kZ_HQ%40mail.gmail.com > <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOATTheY4DsCQbrLugUQxJgq7OSyNdHTUY%3Db%3DWvU1kZ_HQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Christopher Crouzet *https://christophercrouzet.com* <https://christophercrouzet.com> -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CANuKW523MnX4g3AOATrFuqajJb6w4S1p2y5K2ATqd89Qwpfoaw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
