Displaying 1 result from an estimated 1 matches for "get_umask_from_proc".
2016 May 21
1
[PATCH] umask: Use /proc/<PID>/status to read umask in Linux >= 4.7.
.../
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
+#include <stdbool.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
@@ -35,21 +45,81 @@
#include "guestfs.h"
#include "guestfs-internal.h"
+static int get_umask_from_proc (guestfs_h *g);
+static int get_umask_from_fork (guestfs_h *g);
+
/**
- * glibc documents, but does not actually implement, a L<getumask(3)>
- * call.
- *
- * This function implements an expensive, but thread-safe way to get
- * the current process's umask.
- *
* Returns the current pr...