Page MenuHomeFreeBSD

Fix crunchgen usage of mkstemp()
ClosedPublic

Authored by arichardson on Aug 7 2020, 3:09 PM.
Tags
None
Referenced Files
F98096871: D25990.diff
Wed, Oct 2, 8:17 AM
F97997741: D25990.diff
Tue, Oct 1, 11:33 PM
Unknown Object (File)
Mon, Sep 30, 7:05 PM
Unknown Object (File)
Fri, Sep 27, 4:51 PM
Unknown Object (File)
Tue, Sep 24, 3:30 AM
Unknown Object (File)
Sun, Sep 22, 10:31 PM
Unknown Object (File)
Tue, Sep 17, 9:18 AM
Unknown Object (File)
Sun, Sep 8, 7:24 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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.