projects
/
idzebra-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Handle failures for some C calls (chdir, write, etc)
[idzebra-moved-to-github.git]
/
index
/
zebrasrv.c
diff --git
a/index/zebrasrv.c
b/index/zebrasrv.c
index
fad0df7
..
0404b8f
100644
(file)
--- 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