Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/share/mk
Date: Thu, 23 Jan 2014 03:11:14 +0000
From: Taylor R Campbell
<campbell+netbsd-source-changes-d%mumble.net@localhost>
Date: Wed, 22 Jan 2014 13:15:44 -0500
From: christos%zoulas.com@localhost (Christos Zoulas)
On Jan 22, 7:29am, matt%3am-software.com@localhost (Matt Thomas) wrote:
-- Subject: Re: CVS commit: src/share/mk
| I always wondered why we don't use ln -sf
| and avoid the race.
That does not work because if the destnation is a directory it will
try to link in the destination directory... (I tried). This is why
I suggested that it needs to be done differently.
ln -sfh?
As an aside, it would be nice if there were an easy way to create a
symlink at a temporary location and rename it over the permanent one.
`ln -sfh' will unlink instead, and mv(1) is too smart for its own good
about directories to be able to rename over a symlink reliably...
Disregard me -- `ln -sfh' is just as bad as the other race precisely
because of the unlink/symlink sequence, and `-h' is not POSIX to boot.
If we do add a TOOL_LN, we ought to implement a symlink-to-temporary
rename-to-permanent operation so that it actually doesn't race.
Home |
Main Index |
Thread Index |
Old Index