On Tue, May 20, 2014 at 8:29 AM, Stuart Henderson <st...@openbsd.org> wrote:

> On 2014/05/20 16:41, viq wrote:
> > I encountered a strange problem when trying to communicate with
> net/ipcad:
> >
> > rsh localhost stats
> > rsh: poll: Undefined error: 0
>
...

> Note that ipcad listens on port 514 and provides *its own* cisco-ish
> rshell interface that you connect to, this isn't about openbsd rshd.
>
> The error is coming from /usr/src/usr.bin/rsh/rsh.c:243 and since
> nothing changed here in many years, I'm wondering if there's anything
> up with poll(2). (If it's a direct bug with rsh, well, that's "fixed"
> a different way in -current)..
>
...

> 241                 if ((pfd[0].revents & (POLLERR|POLLHUP|POLLNVAL)) ||
> 242                     (pfd[1].revents & (POLLERR|POLLHUP|POLLNVAL)))
> >> 243                      err(1, "poll");
>

It's reporting that the second fd, the stderr fd, has been closed by the
other side (POLLHUP).  Does ipcad implement the expected ordering in the
rsh protocol?


Philip Guenther

Reply via email to