X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fzebrasrv.c;h=0404b8fadbe69bddd6ce29b58d5e10bb0614b3a0;hb=f6e9c4d6c5480b68a703b0aeccf9ba27db68cdea;hp=5683f5818f3d7bf186d76ba72ba670e2bef95177;hpb=89d16cf15eda0e4802d18b8ad09bd3653508ebfc;p=idzebra-moved-to-github.git diff --git a/index/zebrasrv.c b/index/zebrasrv.c index 5683f58..0404b8f 100644 --- a/index/zebrasrv.c +++ b/index/zebrasrv.c @@ -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 @@ -814,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