locked
Service shutdown RRS feed

  • Question

  • Hello,

     

    I'm trying to implement a service drop handler, that leaves a robot in a waiting position when the service is shut down. While this is no problem, when the Command Window is exited with the "Ctl + x" Buttons or the service is shut down using the web-page, the handler is not reached, when I stop the debugging or press the "X" Button of the Command window...

     

    Is there any workaround to get those cases handled?

    The problem is, that the Command windows runs the dsshost and not the service itself...

    Thursday, July 17, 2008 12:46 PM

Answers

  • For the drop handler of a service to be called, either you must send Drop to it directly, or you must cleanly stop the DssHost process.

     

    When you process Ctrl-C in the command window that started DssHost, it actually does do a clean shutdown and will issue Drops to all services in the directory. So make sure your service does indeed insert itself in the service directory.

     

    You can also drop cleanly an entire node, by sending a Drop /DropProcess message to the ControlPanel service programmatically.

     

    Another option is an HttpPost handler in your service, that when it receives a http post from your custom web page, it cleanly shuts itself of, issues a Drop to itself, etc

     

    thanx

    g

     

    • Marked as answer by Trevor Taylor Sunday, May 16, 2010 12:33 AM
    Friday, July 18, 2008 11:01 PM