From 161630f3e1e870dee50cd5c5161e9f09ebe9066b Mon Sep 17 00:00:00 2001 From: Stephan Renatus Date: Mon, 3 Apr 2017 11:15:39 +0200 Subject: Don't exit 0 if killing epmd is impossible because there's living nodes Living nodes will make `epmd -kill` fail, but there's no way to tell except by looking at the commands output. With this change, the exit code will be 1 to indicate failure. Signed-off-by: Stephan Renatus --- erts/epmd/src/epmd_cli.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'erts/epmd/src/epmd_cli.c') diff --git a/erts/epmd/src/epmd_cli.c b/erts/epmd/src/epmd_cli.c index 6fd27d46ea..b10b331cb5 100644 --- a/erts/epmd/src/epmd_cli.c +++ b/erts/epmd/src/epmd_cli.c @@ -46,10 +46,11 @@ void kill_epmd(EpmdVars *g) if ((rval = read_fill(fd,buf,2)) == 2) { if (buf[0] == 'O' && buf[1] == 'K') { printf("Killed\n"); + epmd_cleanup_exit(g,0); } else { printf("Killing not allowed - living nodes in database.\n"); + epmd_cleanup_exit(g,1); } - epmd_cleanup_exit(g,0); } else if (rval < 0) { printf("epmd: failed to read answer from local epmd\n"); epmd_cleanup_exit(g,1); -- cgit v1.2.3 From 83e20c62057ebc1d8064bf57b01be560cd244e1d Mon Sep 17 00:00:00 2001 From: Raimo Niskanen Date: Thu, 4 May 2017 15:42:21 +0200 Subject: Update copyright year --- erts/epmd/src/epmd_cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/epmd/src/epmd_cli.c') diff --git a/erts/epmd/src/epmd_cli.c b/erts/epmd/src/epmd_cli.c index b10b331cb5..0fcdb8c564 100644 --- a/erts/epmd/src/epmd_cli.c +++ b/erts/epmd/src/epmd_cli.c @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 1998-2016. All Rights Reserved. + * Copyright Ericsson AB 1998-2017. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. -- cgit v1.2.3