diff options
author | Calvin Buckley <[email protected]> | 2019-01-26 12:31:50 -0500 |
---|---|---|
committer | Calvin <[email protected]> | 2019-05-29 06:21:42 -0400 |
commit | e0a1799aaaa4bfee44c8cdcf4f30bc2282520a70 (patch) | |
tree | 1e58e4bf97b863cd11b677632b511d10439286e7 /erts/emulator/sys | |
parent | be673b3a01f8039679ff87e637fd943bb81912fc (diff) | |
download | otp-e0a1799aaaa4bfee44c8cdcf4f30bc2282520a70.tar.gz otp-e0a1799aaaa4bfee44c8cdcf4f30bc2282520a70.tar.bz2 otp-e0a1799aaaa4bfee44c8cdcf4f30bc2282520a70.zip |
Try to use NONBLOCK for erl_child_setup
Diffstat (limited to 'erts/emulator/sys')
-rw-r--r-- | erts/emulator/sys/unix/erl_child_setup.c | 9 |
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); |