Lines Matching refs:logfile
76 const char *logfile = "test.log";
94 stat(logfile, &sb);
114 if ((fd = open(logfile, O_RDWR | O_CREAT | O_TRUNC, 0644)) == -1)
115 err(1, "creat(%s)", logfile);
118 if (rename(logfile, new) == -1)
119 warn("rename(%s, %s)", logfile, new);
122 if (link(logfile, new) == -1)
123 err(1, "link(%s, %s)", logfile, new);
124 if (unlink(logfile) == -1)
125 err(1, "unlink(%s)", logfile);
128 * stat() for logfile and new will be identical sometimes,
131 if (stat(logfile, &sb1) == 0 && stat(new, &sb2) == 0 &&
135 " size = %jd\n", logfile, (uintmax_t)sb1.st_ino,