help using (x)inetd

Steve Holden sholden at holdenweb.com
Fri Jul 5 15:49:31 EDT 2002


"Cliff Wells" <logiplexsoftware at earthlink.net> wrote in message
news:mailman.1025654105.12451.python-list at python.org...
> On Tue, 2 Jul 2002 19:39:22 -0400
> rahvee at yaahhoo.com wrote:
>
> > I have xinetd accepting a tcp connection on some port, and spawning a
> > process that I wrote.
> >
> > The process wants to have a conversation.  It can take input, it can
> > make output, but when it prints some output, that output gets buffered
> > by xinetd, and it is never received by the client until the process
> > closes.  My process is written in python.
> >
> > How can I signal inetd to flush the buffer?
>
>
> sys.stdout.flush()
>
Ravee:

Please also note that xinetd is completely out of the picture once your
daemon program is fully started, which is why Cliff's suggestion works: your
daemon program is in control of the socket directo to the client. Xinetd
spawns the right daemon and just carries on waiting for connections.

regards
 Steve






More information about the Python-list mailing list