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

Create temporary files w/o race conditions whenever possible #1145

Open
alexvong243f opened this issue Jun 22, 2022 · 0 comments · May be fixed by #1177
Open

Create temporary files w/o race conditions whenever possible #1145

alexvong243f opened this issue Jun 22, 2022 · 0 comments · May be fixed by #1177
Assignees

Comments

@alexvong243f
Copy link
Collaborator

alexvong243f commented Jun 22, 2022

We should use tmpfile or mkstemp to create temporary files whenever possible (only available in octave). Otherwise, fall back to tempname and print a warning message. If not, we can use java as java is nearly always enabled in matlab. Otherwise, just error out and ask users to enable java.

See also the discussion in #1140.

@alexvong243f alexvong243f self-assigned this Jun 25, 2022
alexvong243f pushed a commit to alexvong243f/octsympy that referenced this issue Jul 6, 2022
Try to create temporary file in the most secure and portable way
possible.

Partially fixes gnu-octave#1145.

* inst/make_temp_file__.m: New function.
* inst/@sym/sym.m: Use it.
* inst/private/python_ipc_system.m: Use it.
alexvong243f pushed a commit to alexvong243f/octsympy that referenced this issue Jul 6, 2022
Try to create temporary directory in the most secure and portable way
possible.

Partially fixes gnu-octave#1145.

* inst/make_temp_dir__.m: New function.
* inst/@sym/function_handle.m: Use it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant