<< | Thread Index | >> ]    [ << | Date Index | >> ]

Subject: Update: CIPE and inetd
From: Martin Buck <mb-list-cipe,AT,gromit,DOT,dyndns,DOT,org>
Date: Tue, 13 Aug 2002 10:09:04 +0200


just a quick update on running CIPE from inetd:

The ENOTCONN I mentioned in my previous mail was caused by ciped not doing
a connect() when running from inetd. However, it does send() (as opposed to
sendto()) on that socket afterwards, so it really needs to be connected. I
fixed that[1] and now the first ciped started by inetd runs fine. If that
one terminates and the next ciped is started, it fails again, this time
with the attach ioctl() returning EBUSY. It's pretty obivous why this
happens: As far as I've seen, the only way to detach a socket is to close
it and that is never done when running from inetd.

I see two possibilities: Either change the attach ioctl() so that it
reattaches a socket if it already is attached. Or add a detach ioctl().

Any opinions about which solution is better? I'd prefer #1 because then you
wouldn't have to do anything special on exit from ciped.


[1] But that's pretty ugly because inetd won't "disconnect" the socket
after cipe has terminated, so from that point on, it will no longer receive
datagrams from anybody else. :-(

<< | Thread Index | >> ]    [ << | Date Index | >> ]