SysToolsLib icon indicating copy to clipboard operation
SysToolsLib copied to clipboard

PSService - Stop on shutdown

Open webalexeu opened this issue 3 years ago • 3 comments

Hello,

It seems that service is not stopping properly when we shutdown the server (Working fine when we stop the service manually) I don't see the stop going in SCMStop neither the exit message send to the pipe, only actions coming from finally loop.

Is this a known issue? Second question, do you plan to integrate the pre-shutdown notification?

Thank you for your work

webalexeu avatar Mar 29 '22 12:03 webalexeu

OnShutdown method is not implemented and that's probably explaining the behaviour

webalexeu avatar Mar 29 '22 19:03 webalexeu

Hello @JFLarvoire , together with @webalexeu we worked on the code to add the OnShutdown() and the "OnPreShutdown()"

https://github.com/JFLarvoire/SysToolsLib/pull/33

Daymarvi avatar Apr 13 '22 11:04 Daymarvi

Hello, Thanks for the proposal. I'm a bit short on time now, and I'll review this in a few days.

JFLarvoire avatar Apr 14 '22 15:04 JFLarvoire

I've merged in PR #33, and implemented most of the changes proposed in #issuecomment-1112394038.

JFLarvoire avatar Jun 14 '24 13:06 JFLarvoire