Ruby 1.6.4
In socket.c, around line 1074
retry:
.....
fd2 = accept(fd, sockaddr, len);
.....
if (fd2 < 0) {
switch (errno) {
case EMFILE:
case ENFILE:
.....
goto retry
.....
}
rb_sys_fail(0);
}
- so although fd2 < 0 indicates an error condition, rb_sys_fail(0) is
called when the switch doesn't match the error
- rb_sys_fail in turn calls strerror(0), which returns "Success" and
then throws an exception with that message text.
- The result is that TCPServer#accept can throw exceptions which say
"Success". Pretty weird, no?
I suspect this is a bug.
Michel
BTW: I tried sending this message twice to the ML but it never
arrived. I'm missing messages 19765, 67-69, 71, 72 and 74 so far.
Count is up to 19781 as of 16:45 CEST.