|
|
| Author |
Message |
< Erlang patches mailing list ~ [PATCH] Exit if an error occurs with the listening socket |
| Guest |
Posted: Mon Mar 22, 2010 6:04 pm |
|
|
|
Guest
|
On Sun, Mar 21, 2010 at 2:30 AM, Michael Santos
<michael.santos@gmail.com> wrote:
> Check errno if either select() or accept() returns an error and exit.
> This prevents epmd from looping and taking up 100% CPU.
Thanks! Will include in 'pu'.
--
Björn Gustavsson, Erlang/OTP, Ericsson AB
________________________________________________________________
erlang-patches (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-patches-unsubscribe@erlang.org
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Mon Mar 22, 2010 6:04 pm |
|
|
|
Guest
|
On Sun, Mar 21, 2010 at 2:30 AM, Michael Santos
<michael.santos@gmail.com> wrote:
> Check errno if either select() or accept() returns an error and exit.
> This prevents epmd from looping and taking up 100% CPU.
Thanks! Will include in 'pu'.
--
Björn Gustavsson, Erlang/OTP, Ericsson AB
________________________________________________________________
erlang-patches (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-patches-unsubscribe@erlang.org
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Tue Mar 30, 2010 9:59 am |
|
|
|
Guest
|
2010/3/22 Björn Gustavsson <bgustavsson@gmail.com>:
> On Sun, Mar 21, 2010 at 2:30 AM, Michael Santos
> <michael.santos@gmail.com> wrote:
>> Check errno if either select() or accept() returns an error and exit.
>> This prevents epmd from looping and taking up 100% CPU.
>
> Thanks! Will include in 'pu'.
I did not build on Windows. I have added an additional
commit that fixes that. I intend to squash that commit into
your commit if/when the branch is graduated.
Are there other platforms that don't have ECONNABORTED
defined?
diff --git a/erts/epmd/src/epmd_srv.c b/erts/epmd/src/epmd_srv.c
index 7e4a661..83ebdaa 100644
--- a/erts/epmd/src/epmd_srv.c
+++ b/erts/epmd/src/epmd_srv.c
@@ -411,7 +411,9 @@ static int do_accept(EpmdVars *g,int listensock)
dbg_perror(g,"error in accept");
switch (errno) {
case EAGAIN:
+#ifndef __WIN32__
case ECONNABORTED:
+#endif
case EINTR:
return EPMD_FALSE;
default:
--
Björn Gustavsson, Erlang/OTP, Ericsson AB
________________________________________________________________
erlang-patches (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-patches-unsubscribe@erlang.org
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Tue Mar 30, 2010 9:59 am |
|
|
|
Guest
|
2010/3/22 Björn Gustavsson <bgustavsson@gmail.com>:
> On Sun, Mar 21, 2010 at 2:30 AM, Michael Santos
> <michael.santos@gmail.com> wrote:
>> Check errno if either select() or accept() returns an error and exit.
>> This prevents epmd from looping and taking up 100% CPU.
>
> Thanks! Will include in 'pu'.
I did not build on Windows. I have added an additional
commit that fixes that. I intend to squash that commit into
your commit if/when the branch is graduated.
Are there other platforms that don't have ECONNABORTED
defined?
diff --git a/erts/epmd/src/epmd_srv.c b/erts/epmd/src/epmd_srv.c
index 7e4a661..83ebdaa 100644
--- a/erts/epmd/src/epmd_srv.c
+++ b/erts/epmd/src/epmd_srv.c
@@ -411,7 +411,9 @@ static int do_accept(EpmdVars *g,int listensock)
dbg_perror(g,"error in accept");
switch (errno) {
case EAGAIN:
+#ifndef __WIN32__
case ECONNABORTED:
+#endif
case EINTR:
return EPMD_FALSE;
default:
--
Björn Gustavsson, Erlang/OTP, Ericsson AB
________________________________________________________________
erlang-patches (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-patches-unsubscribe@erlang.org
Post received from mailinglist |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|