My service crashes during shutdown
- From: si <nomail@xxxxxxxxx>
- Date: Thu, 17 Nov 2005 14:56:35 +0100
Hello
I've written my own service (some kind of a network server). It starts quite fast and works ok. But it crashes when I try to stop it from the service manager.
I think the problem is on my site - I'm not quite sure if I understend how the service should be stopped when SERVICE_CONTROL_STOP request comes in.
Right now when I receive SERVICE_CONTROL_STOP I tell my service thread to stop (what takes some time), set status to SERVICE_STOP_PENDING and return from service control function.
In other words the service control function returns before the service thread finishes.
Can this be a source of a problem?
Should I force service control function to wait until service thread is done?
si .
- Follow-Ups:
- Re: My service crashes during shutdown
- From: Oleg Starodumov
- Re: My service crashes during shutdown
- Prev by Date: Re: Windows Events & Notification Hooks
- Next by Date: Re: Can an application hang Windows 2000?
- Previous by thread: How to check if the program is running on a terminal server?
- Next by thread: Re: My service crashes during shutdown
- Index(es):