aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys/unix/erl_child_setup.c
diff options
context:
space:
mode:
authorZandra Hird <[email protected]>2015-02-03 11:28:38 +0100
committerZandra Hird <[email protected]>2015-02-03 11:28:38 +0100
commit42d6afe554e11813385dbf175fce58f995c2f9e5 (patch)
treecf80330bfcfea1cb07daf13e50d27d2285fbe8b5 /erts/emulator/sys/unix/erl_child_setup.c
parent0fee86f864a4ba2a7a363927a50c81c43994ca9a (diff)
parent6c40ea37d6ba97b12c888cc3143fbeacfb5527b0 (diff)
downloadotp-42d6afe554e11813385dbf175fce58f995c2f9e5.tar.gz
otp-42d6afe554e11813385dbf175fce58f995c2f9e5.tar.bz2
otp-42d6afe554e11813385dbf175fce58f995c2f9e5.zip
Merge branch 'maint-17' into maint
Diffstat (limited to 'erts/emulator/sys/unix/erl_child_setup.c')
-rw-r--r--erts/emulator/sys/unix/erl_child_setup.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/erts/emulator/sys/unix/erl_child_setup.c b/erts/emulator/sys/unix/erl_child_setup.c
index 94eb6b1547..5ad92dad02 100644
--- a/erts/emulator/sys/unix/erl_child_setup.c
+++ b/erts/emulator/sys/unix/erl_child_setup.c
@@ -101,7 +101,9 @@ main(int argc, char *argv[])
if (sscanf(argv[CS_ARGV_FD_CR_IX], "%d:%d", &from, &to) != 2)
return 1;
-#if defined(__ANDROID__)
+#if defined(HAVE_CLOSEFROM)
+ closefrom(from);
+#elif defined(__ANDROID__)
for (i = from; i <= to; i++) {
if (i!=__system_properties_fd)
(void) close(i);
@@ -109,13 +111,6 @@ main(int argc, char *argv[])
#else
for (i = from; i <= to; i++)
(void) close(i);
-#endif /* __ANDROID__ */
-
-#if defined(HAVE_CLOSEFROM)
- closefrom(from);
-#else
- for (i = from; i <= to; i++)
- (void) close(i);
#endif
if (!(argv[CS_ARGV_WD_IX][0] == '.' && argv[CS_ARGV_WD_IX][1] == '\0')
@@ -147,8 +142,6 @@ main(int argc, char *argv[])
return 1;
}
-
-
#if defined(__ANDROID__)
int __system_properties_fd(void)
{