Lines Matching refs:mbfd
159 int mbfd=-1, lfd=-1, rval=EX_OSERR;
189 if ((mbfd = open(path, O_APPEND|O_CREAT|O_EXCL|O_WRONLY|O_EXLOCK,
206 if (fchown(mbfd, pw->pw_uid, pw->pw_gid) == -1) {
215 if ((mbfd = open(path, O_APPEND|O_WRONLY|O_EXLOCK,
220 if (fstat(mbfd, &fsb) == -1) {
237 curoff = lseek(mbfd, 0, SEEK_END);
247 if ((nw = write(mbfd, buf + off, nr - off)) == -1) {
249 (void)ftruncate(mbfd, curoff);
256 (void)ftruncate(mbfd, curoff);
264 if (mbfd != -1) {
265 (void)fsync(mbfd); /* Don't wait for update. */
266 (void)close(mbfd); /* Implicit unlock. */