1 /* This file is part of the YAZ toolkit.
2 * Copyright (C) 1995-2008 Index Data
3 * See the file LICENSE for details.
14 #include <yaz/xmalloc.h>
18 HANDLE default_stop_event = NULL;
19 static void default_sc_stop(yaz_sc_t s)
21 SetEvent(default_stop_event);
24 static int default_sc_main(yaz_sc_t s, int argc, char **argv)
26 default_stop_event = CreateEvent(
27 NULL, // default security attributes
28 TRUE, // manual reset event
29 FALSE, // not signaled
32 if (default_stop_event == NULL)
37 WaitForSingleObject(default_stop_event, INFINITE);
42 int main(int argc, char **argv)
44 yaz_sc_t s = yaz_sc_create("yaz_sc_test", "YAZ Service Control Test");
46 yaz_sc_program(s, argc, argv, default_sc_main, default_sc_stop);
54 * indent-tabs-mode: nil
56 * vim: shiftwidth=4 tabstop=8 expandtab