+New filter grs.marcxml which works like grs.marc but produces MARCXML.
+
+Write zebrasrv.pid to lockdir.
+
Bug fix: result sets were not recovered correctly. Had to
add ODR handle for zebra_search_RPN in order to make it work.
-/* $Id: zebraapi.h,v 1.9 2003-06-30 19:37:12 adam Exp $
+/* $Id: zebraapi.h,v 1.10 2003-08-21 10:30:04 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003
Index Data Aps
const char *name, const char *defaultvalue);
+YAZ_EXPORT void zebra_pidfname(ZebraService zs, char *path);
+
YAZ_END_CDECL
#endif
-/* $Id: zebraapi.c,v 1.112 2003-07-07 14:56:04 heikki Exp $
+/* $Id: zebraapi.c,v 1.113 2003-08-21 10:30:04 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003
Index Data Aps
return 0;
}
+
+void zebra_pidfname(ZebraService zs, char *path)
+{
+ zebra_lock_prefix (zs->global_res, path);
+ strcat(path, "zebrasrv.pid");
+}
+
static
struct zebra_register *zebra_register_open (ZebraService zs, const char *name,
int rw, int useshadow, Res res,
-/* $Id: zserver.c,v 1.109 2003-07-02 22:00:06 adam Exp $
+/* $Id: zserver.c,v 1.110 2003-08-21 10:30:04 adam Exp $
Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003
Index Data Aps
#else
if (!sob->inetd)
{
+ char pidfname[4096];
struct flock area;
- char *pidfile = "zebrasrv.pid";
- int fd = open (pidfile, O_EXCL|O_WRONLY|O_CREAT, 0666);
+ int fd;
+
+ zebra_pidfname(sob->handle, pidfname);
+
+ fd = open (pidfname, O_EXCL|O_WRONLY|O_CREAT, 0666);
if (fd == -1)
{
if (errno != EEXIST)
{
- yaz_log(LOG_FATAL|LOG_ERRNO, "lock file %s", pidfile);
+ yaz_log(LOG_FATAL|LOG_ERRNO, "lock file %s", pidfname);
exit(1);
}
- fd = open(pidfile, O_RDWR, 0666);
+ fd = open(pidfname, O_RDWR, 0666);
if (fd == -1)
{
- yaz_log(LOG_FATAL|LOG_ERRNO, "lock file %s", pidfile);
+ yaz_log(LOG_FATAL|LOG_ERRNO, "lock file %s", pidfname);
exit(1);
}
}
#else
if (!sob->inetd)
- unlink ("zebrasrv.pid");
+ {
+ char pidfname[4096];
+ zebra_pidfname(sob->handle, pidfname);
+ unlink (pidfname);
+ }
#endif
if (sob->handle)
{