-/* $Id: yaz-proxy-main.cpp,v 1.22 2008-02-21 09:33:23 adam Exp $
- Copyright (c) 1998-2006, Index Data.
-
-This file is part of the yazproxy.
+/* This file is part of YAZ proxy
+ Copyright (C) 1998-2011 Index Data
YAZ proxy 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
for more details.
You should have received a copy of the GNU General Public License
-along with YAZ proxy; see the file LICENSE. If not, write to the
-Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.
- */
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
#include <signal.h>
#if HAVE_UNISTD_H
fprintf (stderr, "%s: [-a log] [-c config] [-D]\n"
" [-i sec] [-l log] [-m num] [-n num] [-p pidfile]"
" [-t target] [-T sec] [-u uid]\n"
- " [-v level] [-X] @:port\n", prog);
+ " [-v level] [-X] [-V] @:port\n", prog);
exit (1);
}
char *prog = argv[0];
int ret;
- while ((ret = options("o:a:Dt:v:c:u:i:m:l:T:p:n:X",
+ while ((ret = options("o:a:Dt:v:c:u:i:m:l:T:p:n:VX",
argv, argc, &arg)) != -2)
{
int err;
case 'v':
yaz_log_init_level (yaz_log_mask_str(arg));
break;
+ case 'V':
+ puts(
+#ifdef VERSION
+ VERSION
+#else
+ "unknown"
+#endif
+ );
+ exit(0);
case 'X':
proxy->set_debug_mode(1);
daemon_flags = YAZ_DAEMON_DEBUG;
struct rlimit limit_data;
limit_data.rlim_cur = no_limit_files;
limit_data.rlim_max = no_limit_files;
-
+
yaz_log(YLOG_LOG, "0 setrlimit NOFILE cur=%ld max=%ld",
(long) limit_data.rlim_cur, (long) limit_data.rlim_max);
if (setrlimit(RLIMIT_NOFILE, &limit_data))
yaz_log(YLOG_LOG, "0 getrlimit NOFILE cur=%ld max=%ld",
(long) limit_data.rlim_cur, (long) limit_data.rlim_max);
#endif
-
+
while (m->processEvent() > 0)
;
{
#if YAZ_HAVE_XSLT
xmlInitMemory();
-
+
LIBXML_TEST_VERSION
#endif
SocketManager mySocketManager;
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab