Displaying 3 results from an estimated 3 matches for "b8748e8".
Did you mean:
87488
2016 May 21
1
[PATCH] umask: Use /proc/<PID>/status to read umask in Linux >= 4.7.
...5ab096b8dee59
Use this value if available, else fall back to the existing codepath
for Linux <= 4.6 and other Unix.
---
src/umask.c | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 78 insertions(+), 8 deletions(-)
diff --git a/src/umask.c b/src/umask.c
index b8748e8..3f32337 100644
--- a/src/umask.c
+++ b/src/umask.c
@@ -18,12 +18,22 @@
/**
* Return current umask in a thread-safe way.
+ *
+ * glibc documents, but does not actually implement, a "getumask(3)"
+ * call.
+ *
+ * We use C<Umask> from F</proc/I<PID>/status> for Linux...
2016 Apr 14
0
[PATCH] Add safe wrapper around waitpid which deals with EINTR correctly.
...rs)
ret = -1;
}
}
- if (data->recoverypid > 0) waitpid (data->recoverypid, NULL, 0);
+ if (data->recoverypid > 0) guestfs_int_waitpid_noerror (data->recoverypid);
data->pid = data->recoverypid = 0;
diff --git a/src/umask.c b/src/umask.c
index 834ef43..b8748e8 100644
--- a/src/umask.c
+++ b/src/umask.c
@@ -29,7 +29,6 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <sys/wait.h>
#include "ignore-value.h"
@@ -91,18 +90,13 @@ guestfs_int_getumask (guestfs_h *g)
if (read (fd[0], &ma...
2016 Apr 14
2
[PATCH] Add safe wrapper around waitpid which deals with EINTR correctly.
As Eric Blake noted in:
https://www.redhat.com/archives/libguestfs/2016-April/msg00154.html
libguestfs doesn't correctly handle the case where waitpid receives a
SIGCHLD signal and the main program has registered a non-restartable
signal handler.
In this case waitpid would return -EINTR and we would print an error,
but actually we should retry this case.
This adds two new internal functions,