Closed hannesrauhe closed 9 years ago
You mean, if [ ERROR] stopping lunchinator because of socket error: [Errno 48] Address already in use
happens?
Yes, of course only when trying to start with GUI. You have to decide if this is a good idea for Mac.
The major problem is that you cannot be sure whether it is a running and functioning lunchinator or a real error. You do not get feedback if a Window was opened.
For the PyInstaller build on Mac, it wouldn't change anything since you cannot open an application twice. In AppKit, you can register for a reopen event; I don't know if it is possible to do this in Qt. I'll check.
Implemented reopen on Mac
Changed it on Linux/Windows to open up a test-socket before initializing the logger.
In a recent commit I catched the exception that is been thrown on Windows when the lock file cannot be opened. This usually means that the lunchinator is running already. On Window it is custom to open up the main Window in that case, which I do now.
Maybe you want to implement something similar on Mac? Just send
HELO_OPEN_WINDOW <smth>
to the local lunchinator port to show the main window.