Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pextlib: return 2-element list from mkstemp #308

Closed
wants to merge 1 commit into from

Conversation

chrstphrchvz
Copy link
Contributor

…which when combined with the Tcl 8.5 lassign command should be simpler to use. The two uses updated by this PR are the only ones I am aware of.

Hopefully this makes mkstemp a slightly more attractive replacement for mktemp which relies on the mktemp() C function, which is deprecated since macOS 13 due to possible TOCTOU errors.

@chrstphrchvz
Copy link
Contributor Author

chrstphrchvz commented Nov 15, 2023

Or should mkstemp usage be migrated to Tcl 8.6 file tempfile? See #309

@neverpanic
Copy link
Member

Both look good to me. #309 has the advantage of being less code, which is always good. Less code is less code that Apple might break in the future. I quickly checked the ports tree, but didn't see any (Tcl) use of mktemp or mkstemp, so I think I'd go for #309.

Feel free to merge either of them and close the other one.

@jmroot jmroot closed this Dec 2, 2023
@chrstphrchvz chrstphrchvz deleted the mkstemp-list branch December 2, 2023 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants