-
Notifications
You must be signed in to change notification settings - Fork 419
mktemp() → mkstemp() #871
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
mktemp() → mkstemp() #871
Conversation
da5235c to
3060389
Compare
|
Please ping me when this is ready |
3060389 to
a983f67
Compare
|
The error in tests is currently: That's because @martindurant Is it important that |
|
|
The problem is that the proper way to create and use a temporary file is through the file descriptor returned by mkstemp(). I have to call As for the specific test, the point is indeed that the temporary file should not contain the name of the final target. Why? My guess is that it's for security reasons. When using |
|
Perhaps I can use |
There are two uses for a local temporary file
|
The user isn't interested, but we are testing to make sure that the right thing is happening |
a983f67 to
bc44287
Compare
|
If the end-user is not interested, I'm still wondering why we should expect the name of the temporary file in the I have tried to use the higher-level Note that |
|
Actually, OpenFile and AbstractBufferedFile have |
bc44287 to
a7bda52
Compare
|
Will try that. The nicest version is the simplest:
|
f676a4b to
ace7363
Compare
ace7363 to
c6de321
Compare
|
OK, I think this works fine. Sorry for the long conversation around this! |
mktemp() is deprecated:
Deprecated functions and variables