Page MenuHomeFreeBSD

Fix crunchgen usage of mkstemp()
ClosedPublic

Authored by arichardson on Aug 7 2020, 3:09 PM.
Tags
None
Referenced Files
F105773220: D25990.diff
Fri, Dec 20, 12:17 PM
Unknown Object (File)
Tue, Dec 3, 1:21 PM
Unknown Object (File)
Nov 19 2024, 10:49 PM
Unknown Object (File)
Nov 14 2024, 8:11 PM
Unknown Object (File)
Nov 5 2024, 7:56 AM
Unknown Object (File)
Nov 5 2024, 7:54 AM
Unknown Object (File)
Oct 5 2024, 12:00 PM
Unknown Object (File)
Oct 5 2024, 12:35 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.