diff options
author | Rich Felker <dalias@aerifal.cx> | 2022-04-27 09:10:02 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2022-05-01 23:25:21 -0400 |
commit | 9a9374955517bf731f11fd2c4a071b3cc1120526 (patch) | |
tree | 5a19aedfb9f6df8ebe9bcdad30c1446a94d5a2c4 /include/stdlib.h | |
parent | 12a757b3219408c5f96fd5b9daa5c551944337ee (diff) | |
download | musl-9a9374955517bf731f11fd2c4a071b3cc1120526.tar.gz |
drop use of stat operation in temporary file name generation
this change serves two purposes:
1. it eliminates one of the few remaining uses of the kernel stat
structure which will not be present in future archs, avoiding the need
for growing ifdef logic here.
2. it potentially makes the operations less expensive when the
candidate exists as a non-symlink by avoiding the need to read the
inode (assuming the directory tables suffice to distinguish symlinks).
this uses the idiom I discovered while rewriting realpath for commit
29ff7599a448232f2527841c2362643d246cee36 of being able to use the
readlink operation as an inexpensive probe for file existence that
doesn't following symlinks.
Diffstat (limited to 'include/stdlib.h')
0 files changed, 0 insertions, 0 deletions