X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fsc_test.c;h=3bab6b2fbbe552f9c7c29fe4956f2fb53bc41dbb;hp=05810fcc2331ca4bc05d3a701adcbc9e3b11c480;hb=50cffeb44b5c2b644a76359142063660b6b80f7a;hpb=c81c923c94d47c16308d487de3431f5027059522 diff --git a/src/sc_test.c b/src/sc_test.c index 05810fc..3bab6b2 100644 --- a/src/sc_test.c +++ b/src/sc_test.c @@ -20,12 +20,20 @@ #include #include +/** \brief handle that is used to stop that service should be stopped */ HANDLE default_stop_event = NULL; + +/** \brief stop handler which just signals "stop" */ static void default_sc_stop(yaz_sc_t s) { SetEvent(default_stop_event); } +/** \brief service control main + This does not read argc and argv. + Real applications would typically do that. It is very important that + yaz_sc_running is called before the application starts to operate . +*/ static int default_sc_main(yaz_sc_t s, int argc, char **argv) { default_stop_event = CreateEvent( @@ -43,7 +51,7 @@ static int default_sc_main(yaz_sc_t s, int argc, char **argv) return 0; } - +/** \brief the system main function */ int main(int argc, char **argv) { yaz_sc_t s = yaz_sc_create("yaz_sc_test", "YAZ Service Control Test");