[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gluster-devel] mkostemp vs mkstemp?
From: |
Emmanuel Dreyfus |
Subject: |
[Gluster-devel] mkostemp vs mkstemp? |
Date: |
Thu, 18 Oct 2012 06:54:53 +0200 |
User-agent: |
MacSOUP/2.7 (unregistered for 2098 days) |
Hi
mkostemp() is GNU libc specific. It is used once in glusterfs source, with flags
that seem to do exactly what POSIX-compliant mkstemp() does.
Would there be any issue that I missed with the change below?
--- libglusterfs/src/statedump.c.orig 2012-10-18 06:26:52.000000000 +0200
+++ libglusterfs/src/statedump.c 2012-10-18 06:36:27.000000000 +0200
@@ -57,9 +57,9 @@
gf_proc_dump_open (char *tmpname)
{
int dump_fd = -1;
- dump_fd = mkostemp (tmpname, O_CREAT|O_EXCL|O_RDWR|O_TRUNC|O_APPEND);
+ dump_fd = mkstemp (tmpname);
if (dump_fd < 0)
return -1;
gf_dump_fd = dump_fd;
--
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
address@hidden
- [Gluster-devel] mkostemp vs mkstemp?,
Emmanuel Dreyfus <=