X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=index%2Fzebrasrv.c;h=8de68036b0539f368021c03728fe80f9f3967012;hp=61599bd7868c55a6bcdfab02c03a614939f7b9df;hb=a66b7d79383ae700f3358731eecfe2aafed0e90d;hpb=97a7adeb9e5059463f039495cc01cfa448463a27 diff --git a/index/zebrasrv.c b/index/zebrasrv.c index 61599bd..8de6803 100644 --- a/index/zebrasrv.c +++ b/index/zebrasrv.c @@ -1,5 +1,5 @@ /* This file is part of the Zebra server. - Copyright (C) 1995-2008 Index Data + Copyright (C) 1994-2010 Index Data Zebra 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 @@ -770,7 +770,11 @@ static void bend_start(struct statserv_options_block *sob) char pidstr[30]; sprintf(pidstr, "%ld", (long) getpid()); - write(fd, pidstr, strlen(pidstr)); + if (write(fd, pidstr, strlen(pidstr)) != strlen(pidstr)) + { + yaz_log(YLOG_ERRNO|YLOG_FATAL, "write fail %s", pidfname); + exit(1); + } } } #endif @@ -804,6 +808,7 @@ int main(int argc, char **argv) sob->bend_start = bend_start; sob->bend_stop = bend_stop; #ifdef WIN32 + strcpy(sob->service_name, "zebrasrv"); strcpy(sob->service_display_name, "Zebra Server"); #endif statserv_setcontrol(sob); @@ -813,6 +818,7 @@ int main(int argc, char **argv) /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab