diff options
author | Lukas Larsson <[email protected]> | 2016-05-27 08:53:33 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2016-05-27 08:53:33 +0200 |
commit | ea8064b1bbda0ef59420ec8a805f3ee52630d704 (patch) | |
tree | fd8351867db2f6038002d13970ff385838e1bf73 /erts/etc/common/erlexec.c | |
parent | e5f436615f0649a4d19b03762c016e91e0dce0eb (diff) | |
parent | 8ff06daa90c7c3c599c9e8cbc93fe98c2ed5ebfa (diff) | |
download | otp-ea8064b1bbda0ef59420ec8a805f3ee52630d704.tar.gz otp-ea8064b1bbda0ef59420ec8a805f3ee52630d704.tar.bz2 otp-ea8064b1bbda0ef59420ec8a805f3ee52630d704.zip |
Merge branch 'legoscia/erts/epmd-module-option/OTP-13627'
* legoscia/erts/epmd-module-option/OTP-13627:
Add tests for -start_epmd and -epmd_module options
Use the -epmd_module flag consistently
Add -start_epmd command line option
Diffstat (limited to 'erts/etc/common/erlexec.c')
-rw-r--r-- | erts/etc/common/erlexec.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/erts/etc/common/erlexec.c b/erts/etc/common/erlexec.c index 42da05b1f7..2b2e0e480a 100644 --- a/erts/etc/common/erlexec.c +++ b/erts/etc/common/erlexec.c @@ -195,6 +195,7 @@ static char *plusz_val_switches[] = { #endif void usage(const char *switchname); +static void usage_format(char *format, ...); void start_epmd(char *epmd); void error(char* format, ...); @@ -795,6 +796,24 @@ int main(int argc, char **argv) get_start_erl_data((char *) NULL); } #endif + else if (strcmp(argv[i], "-start_epmd") == 0) { + if (i+1 >= argc) + usage("-start_epmd"); + + if (strcmp(argv[i+1], "true") == 0) { + /* The default */ + no_epmd = 0; + } + else if (strcmp(argv[i+1], "false") == 0) { + no_epmd = 1; + } + else + usage_format("Expected boolean argument for \'-start_epmd\'.\n"); + + add_arg(argv[i]); + add_arg(argv[i+1]); + i++; + } else add_arg(argv[i]); @@ -1173,7 +1192,7 @@ usage_aux(void) "]" #endif "] " - "[-make] [-man [manopts] MANPAGE] [-x] [-emu_args] " + "[-make] [-man [manopts] MANPAGE] [-x] [-emu_args] [-start_epmd BOOLEAN] " "[-args_file FILENAME] [+A THREADS] [+a SIZE] [+B[c|d|i]] [+c [BOOLEAN]] " "[+C MODE] [+h HEAP_SIZE_OPTION] [+K BOOLEAN] " "[+l] [+M<SUBSWITCH> <ARGUMENT>] [+P MAX_PROCS] [+Q MAX_PORTS] " |