Home | History | Annotate | Download | only in makewhatis

Lines Matching defs:whatisdb_new

117 static const char	*whatisdb_new = _PATH_WHATIS ".new";
339 * whatisdb_new exists and is more than (arbitrarily) sixteen
360 if (stat(whatisdb_new, &st_before) == 0) {
363 if (unlink(whatisdb_new) == -1 && errno != ENOENT) {
365 whatisdb_new);
367 warnx("Removed stale `%s'", whatisdb_new);
371 "-- am I already running?", whatisdb_new);
375 err(EXIT_FAILURE, "Cannot stat `%s'", whatisdb_new);
378 outfd = open(whatisdb_new, O_WRONLY|O_CREAT|O_EXCL,
381 err(EXIT_FAILURE, "Cannot open `%s'", whatisdb_new);
384 err(EXIT_FAILURE, "Cannot fstat `%s'", whatisdb_new);
387 err(EXIT_FAILURE, "Cannot fdopen `%s'", whatisdb_new);
391 err(EXIT_FAILURE, "Cannot chmod `%s'", whatisdb_new);
393 err(EXIT_FAILURE, "Cannot close `%s'", whatisdb_new);
395 if (stat(whatisdb_new, &st_after) == -1)
397 whatisdb_new);
402 whatisdb_new);
405 if (rename(whatisdb_new, whatisdb) == -1)
407 whatisdb_new, whatisdb);