On 12/10/2018 12.35, Robert Engels wrote:
> Which is not Windows, which is giving up a lot of options, and is important
> to some people, where as just using tmp files is ok. I am not even sure if
> windows supports deleting an open file yet.
I believe the default behavior is no it does not.
--
On Fri, Oct 12, 2018 at 8:10 AM, Greg Saylor wrote:
>
> If I remember correctly, it would be something like this:
>
>
> fd = open("/tmp", O_TMPFILE | O_RDWR, 0600);
> linkat(fd, "", AT_FDCWD, "/tmp/test", AT_EMPTY_PATH);
>
> This is pretty specific to OS/kernel version and quite possibly the
> fi
If I remember correctly, it would be something like this:
fd = open("/tmp", O_TMPFILE | O_RDWR, 0600);
linkat(fd, "", AT_FDCWD, "/tmp/test", AT_EMPTY_PATH);
This is pretty specific to OS/kernel version and quite possibly the filesystem
too. This could be entirely too much of an edge case to be
Which is not Windows, which is giving up a lot of options, and is important to
some people, where as just using tmp files is ok. I am not even sure if windows
supports deleting an open file yet.
> On Oct 12, 2018, at 3:09 AM, Beoran wrote:
>
> linkat() and openat() are posix 2008 standard func
linkat() and openat() are posix 2008 standard functions so I wouldn't call this
uncommon. As such they are useful to have in Go in one way or the other. The
x/unix package is fine for that, though.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group
If I remember correctly, it would be something like this:
fd = open("/tmp", O_TMPFILE | O_RDWR, 0600);
linkat(fd, "", AT_FDCWD, "/tmp/test", AT_EMPTY_PATH);
This is pretty specific to OS/kernel version and quite possibly the filesystem
too. This could be entirely too much of an edge case to be re
I think a more “standard” and certainly portable way to do this is with a tmp
file, and a rename/move at the end - along with a clean-up of tmp at
application start (if worried about crashes).
Using the proper file and process permissions on the tmp file - since you need
these to protect the fi
On Thu, Oct 11, 2018, at 18:48, Greg Saylor wrote:
> 1. Create a temporary file and squirrel away the file handle
> 2. Unlink the temporary file by name
> 3. Various functions would write stuff to the file
> 4. If the programs completes to some successful state, create a hardlink to
> the file han
On Fri, Oct 12, 2018, 2:31 PM Ian Lance Taylor wrote:
> On Thu, Oct 11, 2018 at 4:48 PM, Greg Saylor
> wrote:
> >
> > In other programming languages (this is specific to Linux/Unix systems),
> in
> > the past to ensure security in the even of a program crash, we would do
> > something like:
> >
On Thu, Oct 11, 2018 at 4:48 PM, Greg Saylor wrote:
>
> In other programming languages (this is specific to Linux/Unix systems), in
> the past to ensure security in the even of a program crash, we would do
> something like:
>
> 1. Create a temporary file and squirrel away the file handle
> 2. Unli
10 matches
Mail list logo