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