/* This file is part of Metaproxy.
- Copyright (C) 2005-2011 Index Data
+ Copyright (C) 2005-2012 Index Data
Metaproxy is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
#include <metaproxy/filter.hpp>
#include <metaproxy/package.hpp>
+#include <metaproxy/util.hpp>
#include "router_flexml.hpp"
#include "factory_static.hpp"
static void sig_term_handler(int s)
{
+ routerp->stop();
+#if 0
kill(-process_group, SIGTERM); /* kill all children processes as well */
_exit(0);
+#endif
}
#endif
mp::Package pack;
pack.router(*routerp).move(); /* should never exit */
+ _exit(0);
}
static void handler_normal(void *data)
yaz_log(YLOG_FATAL, "XInclude processing failed");
return 1;
}
- WRBUF base_path = wrbuf_alloc();
+ mp::wrbuf base_path;
const char *last_p = strrchr(fname,
#ifdef WIN32
'\\'
);
if (last_p)
wrbuf_write(base_path, fname, last_p - fname);
-
+ else
+ wrbuf_puts(base_path, ".");
ret = 0;
try {
mp::FactoryStatic factory;
yaz_log(YLOG_FATAL, "Unknown Exception");
ret = 1;
}
- wrbuf_destroy(base_path);
xmlFreeDoc(doc);
return ret;
}