ninpaths updated

Olaf Titz olaf at
Tue Jan 23 12:01:29 UTC 2001

> > 2. Is there a 'quit' command, or do you just close() the socket when done?
> To INN, it behaves basically just like a port 119 connection, so you can
> send the same basic commands to it.

Wrong. After "MODE CANCEL" the only thing it accepts are Message-IDs.
See NCproc(), just after the comment "We got something" and remember
that cp->State is and will always remain CScancel.

Corollary: there is no "quit" command, just close the connection.

> > 3. Before closing it, do you need to wait for all replies, or
> >    can you just close it even with unread replies? If there's
> >    a quit command, do you need to wait for a reply? What reply ?
> You don't have to wait for the reply to quit.  I'm not sure if you have to
> wait for the replies to the cancel commands; that depends on whether INN
> flushes the buffer on a write error, and I haven't looked at that code to
> see if it does.

It has to do, since an unexpected close can always happen.
NCwritereply() (and the writer routine in CHANreadloop(), just grep
for EPIPE) takes care of this situation.

Basically the recommended mode of operation is this: you open the
cancel socket on startup and never close it explicitly, only exit
after EOF on standard input. (You could shutdown(SHUT_WR) it and drain
any pipelined responses if you want to for statistics.)


More information about the inn-workers mailing list