https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258411
--- Comment #2 from Ed Maste <[email protected]> --- IMO we should either not create but not populate the file, or just treat an empty file as identical to a missing file. E.g. in state_open(): DB * state_open(const char *dbname, int flags, mode_t perm) { DB *db; ... db = dbopen(dbname, flags, perm, DB_HASH, &openinfo); if (db == NULL) { if (errno == ENOENT && (flags & O_CREAT) == 0) return NULL; (*lfun)(LOG_ERR, "%s: can't open `%s' (%m)", __func__, dbname); } return db; } We could add a check for an empty file and also return NULL. -- You are receiving this mail because: You are the assignee for the bug.
