open_db
if ((dbp = open_db(map, O_RDWR|O_EXLOCK|O_EXCL|O_CREAT)) == NULL)
dbp = open_db(map, O_RDONLY);