mirror of
https://github.com/projectatomic/bubblewrap.git
synced 2026-02-05 15:45:22 +01:00
utils: Move TEMP_FAILURE_RETRY reimplementation here
This will allow it to be used in more places. Helps: https://github.com/containers/bubblewrap/issues/657 Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
@@ -44,15 +44,6 @@
|
||||
#define CLONE_NEWCGROUP 0x02000000 /* New cgroup namespace */
|
||||
#endif
|
||||
|
||||
#ifndef TEMP_FAILURE_RETRY
|
||||
#define TEMP_FAILURE_RETRY(expression) \
|
||||
(__extension__ \
|
||||
({ long int __result; \
|
||||
do __result = (long int) (expression); \
|
||||
while (__result == -1L && errno == EINTR); \
|
||||
__result; }))
|
||||
#endif
|
||||
|
||||
/* We limit the size of a tmpfs to half the architecture's address space,
|
||||
* to avoid hitting arbitrary limits in the kernel.
|
||||
* For example, on at least one x86_64 machine, the actual limit seems to be
|
||||
|
||||
9
utils.h
9
utils.h
@@ -46,6 +46,15 @@
|
||||
#define FALSE 0
|
||||
typedef int bool;
|
||||
|
||||
#ifndef TEMP_FAILURE_RETRY
|
||||
#define TEMP_FAILURE_RETRY(expression) \
|
||||
(__extension__ \
|
||||
({ long int __result; \
|
||||
do __result = (long int) (expression); \
|
||||
while (__result == -1L && errno == EINTR); \
|
||||
__result; }))
|
||||
#endif
|
||||
|
||||
#define PIPE_READ_END 0
|
||||
#define PIPE_WRITE_END 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user