general windows services question

R

Ross

When you hit the OnStart() method, the windows service manager waits
30 seconds for that method to return.

What happens when that method doesn't return, besides receiving the
message "The service did not report an error"? Would the manager
attempt to shut down the service? Does it depend on the what the
service was written in?

-Ross
 
J

Jeff Winn

When you hit the OnStart() method, the windows service manager waits
30 seconds for that method to return.

What happens when that method doesn't return, besides receiving the
message "The service did not report an error"? Would the manager
attempt to shut down the service?

If the service doesn't start quickly enough typically the Service Control
Manager (SCM) will just kill the service, including if you're in the middle
of debugging the startup code. Can't remember if an error gets reported in
the error log on the machine, but I imagine that it would.
Does it depend on the what the service was written in?

Nope, that all is handled by the SCM.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top