Sorry, Windows users.
The console interface added in #29 uses QProcess.start() and QProcess.terminate() to start and stop processes. On Unix systems, QProcess.terminate() sends SIGTERM and this works great. On Windows system, QProcess.terminate() raises WM_CLOSE, and that does nothing to stop the server or GUI processes (both are running asyncio event loops).
I don't want to use QProcess.kill() instead because I want graceful shutdowns. Killing the server without giving it time to shut down means that Glasgow won't necessarily be returned to a neutral state, which for some setups means that control of the microscope's scan system is not returned.
Sorry, Windows users.
The console interface added in #29 uses QProcess.start() and QProcess.terminate() to start and stop processes. On Unix systems, QProcess.terminate() sends SIGTERM and this works great. On Windows system, QProcess.terminate() raises WM_CLOSE, and that does nothing to stop the server or GUI processes (both are running asyncio event loops).
I don't want to use QProcess.kill() instead because I want graceful shutdowns. Killing the server without giving it time to shut down means that Glasgow won't necessarily be returned to a neutral state, which for some setups means that control of the microscope's scan system is not returned.