Remove the races so that this is safe to run anytime. We open
authormillert <millert@openbsd.org>
Fri, 21 Apr 2000 17:06:13 +0000 (17:06 +0000)
committermillert <millert@openbsd.org>
Fri, 21 Apr 2000 17:06:13 +0000 (17:06 +0000)
commit873dbcf8aa81282a0064f9bde6c68131131a7aa7
treef3ea8f06e3e5bd7ec91d039ed8f7972bd848daec
parentc9229237e9875723a8496691f165a3a325581758
Remove the races so that this is safe to run anytime.  We open
/var/tmp/vi.recover to get an fd and user O_NOFOLLOW to following a symlink.
Once we have a file handle we can use it to safely chdir to the right
place and form then on do operations relative to ".".  Also restrict
to root.
usr.bin/vi/build/recover