Lines Matching refs:fd
250 block.fd = -1; in createBlock()
267 if ((block.fd = mkstemp(tmpfname)) == -1) in createBlock()
269 if (block.fd == -1) in createBlock()
276 if (ftruncate(block.fd, block.size) == -1) in createBlock()
279 close(block.fd); in createBlock()
280 block.fd = -1; in createBlock()
283 block.start = mmap(NULL, block.size, PROT_READ | PROT_WRITE, MAP_SHARED, block.fd, 0); in createBlock()
287 block.exec = mmap(NULL, block.size, PROT_READ | PROT_EXEC, MAP_SHARED, block.fd, 0); in createBlock()
293 if (block.start && block.exec && block.fd != -1) in createBlock()
300 if (!block.start || !block.exec || block.fd == -1) in createBlock()
303 block.fd = -1; in createBlock()
311 if (block.fd == -1 && block.start == block.exec && block.start != NULL) in freeBlock()
317 if (block.fd != -1) close(block.fd); in freeBlock()