none
Graceful stop of Windows Service that runs inside a windows container RRS feed

  • Question

  • Hello,

    I'm trying to create my docker image that should cover all my needs.... the scenario is the following. I've got a Delphi application that needs to be run as windows service. I'm able to start it correcly and made it run. The service itself performs some operation on a DB and I've noticed that if the docker container stops, it stops almost immediatly, without waiting the current threads to be terminated.

    As far I've read there's not an hook to hook at when the container is stopped, but only a SIG_TERM is sent to the OS hosted. 

    How can  I notify my window service (which is not the main thread I'm executing) to perform the service's stop code, so I don't have partial data processed on the database?

    Thanks in advance

    Paolo


    Tuesday, April 21, 2020 1:32 PM