diff options
author | Stephan Renatus <[email protected]> | 2017-04-03 11:15:39 +0200 |
---|---|---|
committer | Stephan Renatus <[email protected]> | 2017-04-03 11:15:39 +0200 |
commit | 161630f3e1e870dee50cd5c5161e9f09ebe9066b (patch) | |
tree | e9c82967b4d2ac85e3ceb250ea0469f58cc52541 /erts/epmd | |
parent | 6604585547b8e84d53aac174182cfb06289bbf73 (diff) | |
download | otp-161630f3e1e870dee50cd5c5161e9f09ebe9066b.tar.gz otp-161630f3e1e870dee50cd5c5161e9f09ebe9066b.tar.bz2 otp-161630f3e1e870dee50cd5c5161e9f09ebe9066b.zip |
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 <[email protected]>
Diffstat (limited to 'erts/epmd')
-rw-r--r-- | erts/epmd/src/epmd_cli.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |