diff options
author | Magnus Henoch <[email protected]> | 2016-04-20 14:40:39 +0100 |
---|---|---|
committer | Magnus Henoch <[email protected]> | 2016-05-25 17:36:50 +0100 |
commit | 34f853950685e4e7ab38f30fc3f17a6beac13349 (patch) | |
tree | 7861f106dc4f1daa6cd2ac5e57e17e0410353b1e /erts/etc/common | |
parent | 42a0229c44875f927bc1fda138d24131874a1c3c (diff) | |
download | otp-34f853950685e4e7ab38f30fc3f17a6beac13349.tar.gz otp-34f853950685e4e7ab38f30fc3f17a6beac13349.tar.bz2 otp-34f853950685e4e7ab38f30fc3f17a6beac13349.zip |
Add -start_epmd command line option
Add a command line option that lets you disable automatic starting of
epmd when starting a distributed node.
This differs from the undocumented setting -no_epmd, in that it does
not affect the starting of an erl_epmd process within
erl_distribution: the newly started node will expect an epmd instance
to have been started previously.
Diffstat (limited to 'erts/etc/common')
-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] " |