Home Bug Reports

Error in service implementation

stephanstephan Member Stephan StapelOrganization: Stephan StapelProject: BristolNG
Dear people at ZeroC,

When running my services on my Windows 2003/ XP/ NT machines and changing the current user, the service will be terminated. As this is quite uncommon for services, I'd like to ask you to change this behavior :)
Unfortunately I did not find no error in your current implementation, but I hope that you will be able to track it down successfully :)

kind regards,

Stephan

Comments

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi Stephan,

    Thanks for the bug report. This problem will be fixed in the next release. Please let me know if you'd like a temporary workaround.

    Take care,
    - Mark
  • stephanstephan Member Stephan StapelOrganization: Stephan StapelProject: BristolNG
    Hi Mark!
    Please let me know if you'd like a temporary workaround.

    Sure would I like to get the patch :)
    btw: Do you already have a (approximate) date for the next release?

    regs,

    Stephan
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Originally posted by stephan
    Sure would I like to get the patch :)
    Edit the file src/Ice/Service.cpp and modify the ctrlCHandlerCallback function as shown below:
    static void
    ctrlCHandlerCallback(int sig)
    {
    #ifdef _WIN32
        if(sig == CTRL_LOGOFF_EVENT)
        {
            return;
        }
    #endif
        Ice::Service* service = Ice::Service::instance();
        assert(service != 0);
        service->handleInterrupt(sig);
    }
    
    Note that this is only a temporary workaround, as it only applies to Windows and always ignores CTRL_LOGOFF_EVENT. We will provide a better solution in the next release.
    btw: Do you already have a (approximate) date for the next release?
    No, we haven't set a target date yet.

    Take care,
    - Mark
Sign In or Register to comment.