mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-24 07:40:52 +00:00
Make ldconfig(8) atomic, by removing an unneccessary call to unlink(2)
before rename(2). Reviewed by: kib MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D16641
This commit is contained in:
parent
25a1e0f636
commit
308224833a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=337530
@ -518,13 +518,6 @@ buildhints(void)
|
||||
warn("%s", hints_file);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Install it */
|
||||
if (unlink(hints_file) != 0 && errno != ENOENT) {
|
||||
warn("%s", hints_file);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (rename(tmpfilename, hints_file) != 0) {
|
||||
warn("%s", hints_file);
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user