Deutro
Deutro

Reputation: 3323

Netstop instantly reports service stopped which is wrong

I need to stop a service before I update my application. Netstop instantly answers that the service is stopped but in reality it isn't (I can still see the process ID).

Is there a way to check if the process is really stopped after using netstop? Or do I have to use a delay which might work in most cases?

Upvotes: 1

Views: 25

Answers (1)

Hozikimaru
Hozikimaru

Reputation: 1166

We have encountered this issue with one of our previous projects. Unfortunately, you are correct and windows reports the service as stopped while it is still releasing the resources. Our solution was to check the files that are being used by the process and see if they are still in use. We checked every second until the files were released.

Upvotes: 1

Related Questions