Page MenuHomeFreeBSD

Fix crunchgen usage of mkstemp()
ClosedPublic

Authored by arichardson on Aug 7 2020, 3:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 29, 4:10 AM
Unknown Object (File)
Mar 4 2024, 9:45 PM
Unknown Object (File)
Jan 17 2024, 12:58 PM
Unknown Object (File)
Jan 13 2024, 8:55 PM
Unknown Object (File)
Jan 10 2024, 8:08 PM
Unknown Object (File)
Jan 10 2024, 8:08 PM
Unknown Object (File)
Jan 10 2024, 8:08 PM
Unknown Object (File)
Jan 3 2024, 1:47 AM
Subscribers

Details

Summary

On Glibc systems mkstemp can only be used once with the same template
string since it will be modified in-place and no longer contain any 'X' chars.
It is fine to reuse the same file here but we need to be explicit and use
open() instead of mkstemp() on the second use.

While touching this file also avoid a hardcoded /bin/pwd since that may not
work when building on non-FreeBSD systems.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 32841
Build 30251: arc lint + arc unit

Event Timeline

arichardson created this revision.

This seems a bit clunky, but if this is the least disruptive change it seems fine.

This revision is now accepted and ready to land.Aug 10 2020, 5:41 PM
This revision was automatically updated to reflect the committed changes.