ayaports/backports/electron/temp-failure-retry.patch

20 lines
713 B
Diff
Raw Normal View History

2023-05-05 05:10:04 +00:00
random glibc macro, not provided by musl.
https://www.gnu.org/software/libc/manual/html_node/Interrupted-Primitives.html
2023-01-11 00:40:45 +00:00
--- a/sandbox/linux/suid/process_util.h
+++ b/sandbox/linux/suid/process_util.h
@@ -11,6 +11,14 @@
#include <stdbool.h>
#include <sys/types.h>
+// Some additional functions
+# define TEMP_FAILURE_RETRY(expression) \
+ (__extension__ \
+ ({ long int __result; \
+ do __result = (long int) (expression); \
+ while (__result == -1L && errno == EINTR); \
+ __result; }))
+
// This adjusts /proc/process/oom_score_adj so the Linux OOM killer
// will prefer certain process types over others. The range for the
// adjustment is [-1000, 1000], with [0, 1000] being user accessible.