[2476] in linux-net channel archive

home help back first fref pref prev next nref lref last post

rwhod: Connection refused

daemon@ATHENA.MIT.EDU (Philip Blundell)
Sat Apr 13 02:43:19 1996

Date: 	Fri, 12 Apr 1996 20:09:33 +0100 (BST)
From: Philip Blundell <phil@tazenda.demon.co.uk>
To: linux-net@vger.rutgers.edu

Apologies in advance if I'm being stupid...

Every three minutes, I get "rwhod: recv: Connection refused" in my logs.
Looking at the source, rwhod is doing this, much as you'd expect:

                cc = recvfrom(s, (char *)&wd, sizeof (struct whod), 0,
                        &from, &len);
                if (cc <= 0) {
                        if (cc < 0 && errno != EINTR)
                                syslog(LOG_WARNING, "recv: %m");
                        continue;
                }

... and it has an alarm set to wake it up after three minutes so it can
transmit.

Now, as far as I can see, it looks as through recvfrom() is returning
ECONNREFUSED instead of EINTR when it's interrupted by the alarm.
Certainly it doesn't seem to make a lot of sense for recvfrom() to ever
return ECONNREFUSED normally.  Am I doing something obviously wrong, and
has anybody else seen this?

P.



home help back first fref pref prev next nref lref last post