You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been working with the Windows Service (svc) package in the golang/sys repository and it has been a great resource so far. However, I've run into a situation where the existing functionality might be enhanced.
In certain scenarios, a Windows Service might need more time to finish its operations before being stopped. If the service doesn't stop in a timely manner, Windows forcibly kills it. To prevent this from happening, the .NET framework provides a RequestAdditionalTime() method which allows a service to request more time for its shutdown operations.
As of now, it seems that this functionality is not available in the Windows Service (svc) package of the golang/sys repository.
Would it be possible to consider the addition of a similar method, possibly called RequestAdditionalTime(), to the svc package? This would greatly help in managing services that require a bit more time to shut down gracefully and it could prevent unwanted service terminations.
Thank you for considering this feature request. I believe it would be a valuable addition to the library and it would provide greater control over the lifecycle of Windows Services.
Looking forward to hearing your thoughts on this.
The text was updated successfully, but these errors were encountered:
After further exploration and testing, I've found that I can achieve the desired outcome by making use of the WaitHint in the StopPending Status. By passing multiple StopPending updates with an appropriate WaitHint, I can effectively request additional time before Windows forcibly terminates the service, similar to how the RequestAdditionalTime() method works in .NET.
In light of this, it seems that the addition of a RequestAdditionalTime() method would primarily serve as a neat wrapper for this process rather than a new, necessary feature.
Given this, I believe it would be appropriate to close the feature request at this time. However, it may be worth considering documenting this process for the benefit of developers who find themselves in similar situations.
Thank you for your time and consideration. I appreciate your commitment to maintaining and enhancing the golang/sys repository.
Hello,
I've been working with the Windows Service (svc) package in the golang/sys repository and it has been a great resource so far. However, I've run into a situation where the existing functionality might be enhanced.
In certain scenarios, a Windows Service might need more time to finish its operations before being stopped. If the service doesn't stop in a timely manner, Windows forcibly kills it. To prevent this from happening, the .NET framework provides a RequestAdditionalTime() method which allows a service to request more time for its shutdown operations.
As of now, it seems that this functionality is not available in the Windows Service (svc) package of the golang/sys repository.
Would it be possible to consider the addition of a similar method, possibly called RequestAdditionalTime(), to the svc package? This would greatly help in managing services that require a bit more time to shut down gracefully and it could prevent unwanted service terminations.
Thank you for considering this feature request. I believe it would be a valuable addition to the library and it would provide greater control over the lifecycle of Windows Services.
Looking forward to hearing your thoughts on this.
The text was updated successfully, but these errors were encountered: