From 8b9519ccf398107c404a266687ed4b6456bef143 Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Tue, 11 Jan 2011 17:23:08 +0100 Subject: Remove special treatment of EADDRINUSE --- erts/epmd/src/epmd_srv.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'erts/epmd') diff --git a/erts/epmd/src/epmd_srv.c b/erts/epmd/src/epmd_srv.c index 6b3900fae2..3499ab2934 100644 --- a/erts/epmd/src/epmd_srv.c +++ b/erts/epmd/src/epmd_srv.c @@ -2,7 +2,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 1998-2010. All Rights Reserved. + * Copyright Ericsson AB 1998-2011. All Rights Reserved. * * The contents of this file are subject to the Erlang Public License, * Version 1.1, (the "License"); you may not use this file except in @@ -157,20 +157,10 @@ void run(EpmdVars *g) dbg_printf(g,2,"starting"); - if(listen(listensock, SOMAXCONN) < 0) - { - if (errno == EADDRINUSE) - { - dbg_tty_printf(g,1,"there is already a epmd running at port %d", - g->port); - epmd_cleanup_exit(g,0); - } - else - { - dbg_perror(g,"failed to listen on socket"); - epmd_cleanup_exit(g,1); - } - } + if(listen(listensock, SOMAXCONN) < 0) { + dbg_perror(g,"failed to listen on socket"); + epmd_cleanup_exit(g,1); + } FD_ZERO(&g->orig_read_mask); FD_SET(listensock,&g->orig_read_mask); -- cgit v1.2.3