octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #48326] mkstemp opens file in text mode on Win


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #48326] mkstemp opens file in text mode on Windows (test printd fails)
Date: Tue, 12 Jul 2016 22:14:48 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0

Follow-up Comment #20, bug #48326 (project octave):

Great, thank you for confirming, I'll push this fix shortly.

Sure, it's not an atomic operation from a processor instruction point of view.
But it opens the file in a safe exclusive manner before it returns the file
name to you. So not only do you get a temporary file name, but you get an open
file that is guaranteed to have been created by your process with permissions
to only be readable and writable by your process.

There is no way to tell from your example whether the file name returned by
tempname() existed before I opened it, if it's empty or not, if I even own the
file or if someone else owns it, or what its user access permissions are set
to.

Anyway, glad to see we can get this working.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48326>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]