summaryrefslogtreecommitdiff
path: root/glnx-dirfd.h
diff options
context:
space:
mode:
authorPhilip Withnall <withnall@endlessm.com>2017-04-20 18:01:56 +0100
committerPhilip Withnall <withnall@endlessm.com>2017-04-21 14:06:19 +0100
commit6746e6f54d6d29066011bace3b7820e9ca240ac6 (patch)
tree3847e29c41817df274d0b7b6ccfdf5c8b9042026 /glnx-dirfd.h
parent9307f51893702e9bdd2292e46de64e9e5aecb50f (diff)
downloadlibglnx-6746e6f54d6d29066011bace3b7820e9ca240ac6.tar.gz
glnx-dirfd: Add variants of glnx_mkdtempat() which open the directory
At the moment, it’s not possible for them to do this race-free (since openat(O_DIRECTORY | O_CREAT | O_EXCL) doesn’t work), but in future this could be possible. In any case, it’s a useful thing to want to do. Signed-off-by: Philip Withnall <withnall@endlessm.com>
Diffstat (limited to 'glnx-dirfd.h')
-rw-r--r--glnx-dirfd.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/glnx-dirfd.h b/glnx-dirfd.h
index 3a76695..0cb79e6 100644
--- a/glnx-dirfd.h
+++ b/glnx-dirfd.h
@@ -88,4 +88,15 @@ gboolean glnx_mkdtempat (int dfd,
int mode,
GError **error);
+gboolean glnx_mkdtempat_open (int dfd,
+ gchar *tmpl,
+ int mode,
+ int *out_dfd,
+ GError **error);
+
+gboolean glnx_mkdtempat_open_in_system (gchar *tmpl,
+ int mode,
+ int *out_dfd,
+ GError **error);
+
G_END_DECLS