aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc/common/erlexec.c
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-05-13 14:21:39 +0200
committerBjörn Gustavsson <[email protected]>2011-05-13 14:21:39 +0200
commite008b6385d038196f7d2c9db98339e311e48fa88 (patch)
tree049861397ceb4147c97940fe7ca658de1bdc1761 /erts/etc/common/erlexec.c
parent0dde47552986f06dc31d43586f6c31d82050f60d (diff)
parent418d08ee5ac108d47940516e62580c9393395c4d (diff)
downloadotp-e008b6385d038196f7d2c9db98339e311e48fa88.tar.gz
otp-e008b6385d038196f7d2c9db98339e311e48fa88.tar.bz2
otp-e008b6385d038196f7d2c9db98339e311e48fa88.zip
Merge branch 'bjorn/test-environment-improvements/OTP-9297' into dev
* bjorn/test-environment-improvements/OTP-9297: erlexec: Make ERL_<version>_FLAGS behave like ERL_AFLAGS cerl: Fix several incompatibilities with 'erl' Teach erlexec the -emu_name_exit option cerl: Remove ancient obsolete options
Diffstat (limited to 'erts/etc/common/erlexec.c')
-rw-r--r--erts/etc/common/erlexec.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/erts/etc/common/erlexec.c b/erts/etc/common/erlexec.c
index 60b3af7db7..90d3be9448 100644
--- a/erts/etc/common/erlexec.c
+++ b/erts/etc/common/erlexec.c
@@ -394,6 +394,7 @@ int main(int argc, char **argv)
int print_args_exit = 0;
int print_qouted_cmd_exit = 0;
erts_cpu_info_t *cpuinfo = NULL;
+ char* emu_name;
#ifdef __WIN32__
this_module_handle = module;
@@ -566,6 +567,7 @@ int main(int argc, char **argv)
usage("+MYm");
}
emu = add_extra_suffixes(emu, emu_type);
+ emu_name = strsave(emu);
erts_snprintf(tmpStr, sizeof(tmpStr), "%s" DIRSEP "%s" BINARY_EXT, bindir, emu);
emu = strsave(tmpStr);
@@ -682,6 +684,9 @@ int main(int argc, char **argv)
verbose = 1;
} else if (strcmp(argv[i], "-emu_args_exit") == 0) {
print_args_exit = 1;
+ } else if (strcmp(argv[i], "-emu_name_exit") == 0) {
+ printf("%s\n", emu_name);
+ exit(0);
} else if (strcmp(argv[i], "-emu_qouted_cmd_exit") == 0) {
print_qouted_cmd_exit = 1;
} else if (strcmp(argv[i], "-env") == 0) { /* -env VARNAME VARVALUE */
@@ -1970,6 +1975,11 @@ initial_argv_massage(int *argc, char ***argv)
*/
vix = 0;
+
+ av = build_args_from_env("ERL_" OTP_SYSTEM_VERSION "_FLAGS");
+ if (av)
+ avv[vix++].argv = av;
+
av = build_args_from_env("ERL_AFLAGS");
if (av)
avv[vix++].argv = av;
@@ -1984,10 +1994,6 @@ initial_argv_massage(int *argc, char ***argv)
if (av)
avv[vix++].argv = av;
- av = build_args_from_env("ERL_" OTP_SYSTEM_VERSION "_FLAGS");
- if (av)
- avv[vix++].argv = av;
-
av = build_args_from_env("ERL_ZFLAGS");
if (av)
avv[vix++].argv = av;