aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--erts/emulator/sys/unix/erl_child_setup.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/erts/emulator/sys/unix/erl_child_setup.c b/erts/emulator/sys/unix/erl_child_setup.c
index f3662f94c6..9241660069 100644
--- a/erts/emulator/sys/unix/erl_child_setup.c
+++ b/erts/emulator/sys/unix/erl_child_setup.c
@@ -75,6 +75,10 @@
#define SHELL "/bin/sh"
#endif /* __ANDROID__ */
+#if !defined(MSG_DONTWAIT) && defined(MSG_NONBLOCK)
+#define MSG_DONTWAIT MSG_NONBLOCK
+#endif
+
//#define HARD_DEBUG
#ifdef HARD_DEBUG
#define DEBUG_PRINT(fmt, ...) fprintf(stderr, "%d:" fmt "\r\n", getpid(), ##__VA_ARGS__)
@@ -491,12 +495,7 @@ main(int argc, char *argv[])
ErtsSysForkerProto proto;
errno = 0;
if ((res = sys_uds_read(uds_fd, (char*)&proto, sizeof(proto),
-#if defined(MSG_DONTWAIT)
pipes, 3, MSG_DONTWAIT)) < 0) {
-#else
- /* XXX: a workaround here? */
- pipes, 3, 0)) < 0) {
-#endif
if (errno == EINTR)
continue;
DEBUG_PRINT("erl_child_setup failed to read from uds: %d, %d", res, errno);