Archived

This forum has been archived. Please start a new discussion on GitHub.

API change in Ice 3.2 in Service::configureDaemon?

Hi there -

I just upgraded to Ice 3.2 (thanks!) and suddenly my code doesn't compile. The API for the Service::configureDaemon function changed - now there's a third argument, of type const std::string&, which isn't documented anywhere, as far as I can tell (at least not in the C++ server side main function part of the documentation, and not even in Ice/Service.h above the declaration). Is that supposed to be there / is it a bug / is something missing from the documentation?

thanks -

Clay

Comments

  • benoit
    benoit Rennes, France
    Hi,

    Something is missing from the documentation. The third parameter is a string that should be set to the path of a PID file if you want the service to generate a file containing the PID on startup. You can pass an empty string if you don't want the service to generate a PID file.

    Thanks for the report, this will be fixed!

    Cheers,
    Benoit.
  • oh, cool. that'll be nice to have! Is there an argument I can pass on the command line that'll fill that value in by default (if I'm not using configureDaemon explicitly)? Then I can use start-stop-daemon in an ubuntu init.d script and have it do the right thing with a PID file.

    thanks!

    Clay

    (my signature is wrong. I'll have to update my profile).
  • benoit
    benoit Rennes, France
    Hi Clay,

    Yes, you can use the --pidfile option. See page 274 in the Ice manual for more information.

    Cheers,
    Benoit.