comp.os.linux.networking
[Top] [All Lists]

Re: xinetd

Subject: Re: xinetd
From: Buzzbomb
Date: Wed, 11 May 2005 07:13:03 GMT
Newsgroups: comp.os.linux.networking
Sigrid Thijs wrote:
Hi,

I've been looking at xinetd, and I was wondering if the following is possible. I have a service that waits for incoming TCP requests and sends a response to a client. Say that the service listens at port 10000.
The configuration is as follows:

service myservice
{
    disable         = no
        socket_type     = stream
        wait            = yes
        user            = root
        server          = /path/to/myservice
    port         = 10000
    protocol    = tcp
}

The objective is to have xinetd listening at port 10000 and when the first request comes in to start up 'myservice'. This all works. The problem is that I want 'myservice' to listen at port 10000 once it's started. But that fails because xinetd does not close the socket it is listening on while waiting for 'myservice' to finish (so bind in 'myservice' fails).
Is there a workaround to take over control of the listening socket?
Setting wait to no is not an option as this generates multiple instances of 'myservice' and that is not what I want.

Kind regards,
Sigrid
xinetd is more about starting "one-shot" services on demand rather than starting up a permanent daemon.

If you want to start a continuously listening daemon, start it from the rc scripts.

B.

<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy