I’ve extended qpidd to run as a self-installing windows service and am
working on cleaning up my code before submitting a patch.



I have one ugly issue remaining I’d like to ask for help with, as it
intersects both boost issues and qpidd code style, and I’m not at all clear
what the ‘best’ way to proceed would be within those contexts.



Specifically, I need to capture the original argument list passed into qpidd
so it may be preserved for when the application runs as a service.  I’ve
currently added a small block of #ifdef WIN32 code to the top of the main
function in qpidd.cpp that prescans the arg list, and on an install arg hit
passes the full arg list (arfc,argv) to a function that installs the
service, then exists.



I’d like to move this into the platform specific QpiddBroker.cpp file (as I
understand the #ifdef {platform} violates a qpid style rule), but 1) I don’t
see the arg list being preserved past boost program_options parse(), and 2)
I believe I need the arg list BEFORE boost gets ahold of it, as boost
automagically folds config file & environment arguments into the options –
nice for runtime use, bad for deferred execution like my use case (install
now, run later.)


Suggestions?


Also, FWIW:



Features now working (currently testing WinXP SP2 > Win7, Server 2008, all
32 & 64 bit)

  --install  (install this executable as a windows service)

  --start (start the service)

  --stop (stop the service, including any dependant services)

  --uninstall (uninstall the service)



Features in progress: (names are bad, need better...)

  --account {name} {password}  (default=LocalSystem)

  --startup auto|manual

  Use of event log


As a side note, if anyone has any other suggestions related to this or other
service features, please let me know and I’ll see if I can add it.

Kerry

Reply via email to