On Fri, Jun 16, 2017 at 6:06 PM, Sebastian M. Ernst ernst@pleiszenburg.de wrote:
Hi Sebastian,
thanks a lot for the idea.
I tried to convert your idea into a quick & dirty piece of actual code for testing it - see below this email. Simplified into pseudo-code I do the following:
- create socket object, type unix / stream (w/o reference to file/path)
- try: connect to socket file
- if failed, wait for x seconds and repeat last step (until timeout)
- if succeeded, close the connection and let the code go ahead
Not sure if I got the problem you are describing exactly but what about doing the opposite direction? Make a very simple socket program for Windows that is launched and this program connects to your python application instead. When python notices the connection it is sure that wineserver is running because it just received the connection from an app running inside Wine. Also as long as this small utility is up wineserver won't close too.
Best wishes, Bruno