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
5b5bf02859
commit
69ce84ba22
@ -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