0

I have a java server console program that I have configured xinetd to start when connection comes in on a given port and then the program runs in an infinite loop receiving inputstream from telephone exchanges.

The thing is, when a new chunk of stream comes from the exchange xinetd forks a new process each time. I tried setting the wait parameter to yes and restarted the deamon, but no success.

How can I stop this behavior and have the deamon just direct the stream to the process already running? Am I missing something in my config or is it just incorrect?

My config is as follows:

defaults
{
        instances               = 60
        log_type                = SYSLOG authpriv
        log_on_success          = HOST PID
        log_on_failure          = HOST
        cps                     = 50 10
}
includedir /etc/xinetd.d

And then my actual config,

service aos_larmar
{
         socket_type         = stream
         protocol            = tcp
         user                = root
         type                = UNLISTED
         wait                = yes
     instances           = 256
         server              = /home/gunnl/java/start.sh
         port                = 5204
         disable             = no
}

My server OS is
Red Hat Enterprise Linux ES release 4 (Nahant Update 7)

Hennes
  • 65,804
  • 7
  • 115
  • 169

1 Answers1

1

xinetd works by forking a new process for each connection, and the connection is closed when the process ends. If you have a persistent process then you should look at using something like netcat instead.