int readonly = !strcmp(type, "r");
struct flock fl = { readonly? F_RDLCK : F_WRLCK, SEEK_SET, 0, 0, 0 };
int fd;
int readonly = !strcmp(type, "r");
struct flock fl = { readonly? F_RDLCK : F_WRLCK, SEEK_SET, 0, 0, 0 };
int fd;
xlog(L_WARNING, "failed to lock %s: errno %d (%s)",
fname, errno, strerror(errno));
close(fd);
xlog(L_WARNING, "failed to lock %s: errno %d (%s)",
fname, errno, strerror(errno));
close(fd);