Lines Matching full:state_fd
314 THREAD_LOCAL int state_fd = -2;
323 if (state_fd == -2) {
325 state_fd = open("/var/lib/libuuid/clock.txt",
328 state_f = fdopen(state_fd, "r+");
330 close(state_fd);
331 state_fd = -1;
339 if (state_fd >= 0) {
341 while (fcntl(state_fd, F_SETLKW, &fl) < 0) {
345 close(state_fd);
346 state_fd = -1;
350 if (state_fd >= 0) {
401 if (state_fd > 0) {
408 if (ftruncate(state_fd, len) < 0) {
414 fcntl(state_fd, F_SETLK, &fl);