aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2011-01-13 16:16:05 +0100
committerPatrik Nyblom <[email protected]>2011-01-13 16:16:12 +0100
commitac360e9814880585d8674d8c1404649d98e97ff5 (patch)
tree882ce88fbca6f10637324173355555feffa83b69
parentc6abed0fa0cbda3247bfd935bdc325f8983320cc (diff)
parent8b9519ccf398107c404a266687ed4b6456bef143 (diff)
downloadotp-ac360e9814880585d8674d8c1404649d98e97ff5.tar.gz
otp-ac360e9814880585d8674d8c1404649d98e97ff5.tar.bz2
otp-ac360e9814880585d8674d8c1404649d98e97ff5.zip
Merge branch 'sv/epmd-check-listen' into dev
* sv/epmd-check-listen: Remove special treatment of EADDRINUSE check return value of epmd server listen() call OTP-9024
-rw-r--r--erts/epmd/src/epmd_srv.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/erts/epmd/src/epmd_srv.c b/erts/epmd/src/epmd_srv.c
index ef471a473a..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,8 +157,10 @@ void run(EpmdVars *g)
dbg_printf(g,2,"starting");
- listen(listensock, SOMAXCONN);
-
+ 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);