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
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab