[Bugzilla user: bgo@osimis.io]
[Bugzilla date: 2021-01-19T08:55:51+00:00]
The following changes have been brought in CL 8ab6399, 5c1695c, 2403546 and be26d8a of the orthanc-builder repository:
- When the service process launches the Orthanc The CREATE_NEW_PROCESS_GROUP is not used anymore. This should prevent a Windows shutdown process to kill Orthanc (only top-level processes are killed)
- SIGINT is only sent to the child process when stopping the service, not when shutting down Windows, since the OS, in the latter case, sends a SIGINT automatically. This prevents the second extraneous signal from being sent.
- The service process itself does not allocate a permanent console. This is cleaner since services should not be attached a console. A console is only temporarily attached when required (i.e. to send the SIGINT signal to Orthanc.exe)
- Instead of an idle waiting period while the service is stopping, the service now properly reports the pending stop operation progress to the Service Control Manager, requesting extra shutdown time until properly stopped.
- The installer process, at uninstall time, now propertly waits for the Orthanc service to stop. This prevents stray files from being left in the install folders (although some files, such as the potentially user-customized configuration files amd the logs are not removed by the installer...)
These fixes greatly improve the situation. Currently, the OS still forcefully kills Orthanc after a few seconds when shutting down an HyperV guest VM running Windows 10 1909). In most scenarios, there should be enough time for Orthanc to properly stop.
This is being investigated. |