CVSROOT: /cvs Module name: src Changes by: schwa...@cvs.openbsd.org 2012/01/05 15:48:52
Modified files: usr.bin/mandoc : mandocdb.c Log message: Do not truncate the production database when starting to build a new one, because that would break apropos(1) during the build, and if the build fails, you would be left without any database at all. Instead, build the database in temporary files in the same directory and rename(2) them into place when they are ready. Suggested by deraadt@. There is still a tiny race between the two rename(2)s; if that's a problem, we can solve it later using locking. Put this in now such that we can move on.