I have a xinetd service that is a script and the output is read by netcat on a remote host.However, when the script on the server exits, netcat still waits although, there won't follow anything. How can I close the connection from the server or maybe send end of file or something similar?My service:service myservice{   port            = 2222   socket_type     = stream   protocol        = tcp   wait            = no   server          = /opt/myscript.sh   user            = root   disable         = no}My script:#!/bin/sh##Example:echo Hello World!Netcat output:[me@mypc]# nc myhost 2222Hello World!*blinking cursor forever*Output(tail) of strace nc myhost 2222:connect(3, {sa_family=AF_INET6, sin6_port=htons(2222), inet_pton(AF_INET6, ::1, &sin6_addr), sin6_flowinfo=htonl(0), sin6_scope_id=0}, 28) = -1 EINPROGRESS (Operation now in progress)select(4, [3], [3], [3], {tv_sec=10, tv_usec=0}) = 1 (out [3], left {tv_sec=9, tv_usec=999997})getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0select(4, [0 3], [], [], NULL)          = 1 (in [3])recvfrom(3, Hello World!\n, 8192, 0, 0x, [128->0]) = 13write(1, Hello World!\n, 13Hello World!)          = 13select(4, [0 3], [], [], NULL)          = 1 (in [3])recvfrom(3, , 8192, 0, 0x, [128->0]) = 0close(1)                                = 0select(3, [0], [], [], NULLIt just stops there. I then have to ^C so the last line actually looks like:select(3, [0], [], [], NULL^Cstrace: Process 6232 detached <detached ...>Tcpdump:IP6 localhost.36082 > localhost.myservice: Flags [S], seq 3879998021, win 43690, options [mss 65476,sackOK,TS val 3800136568 ecr 0,nop,wscale 7], length 0IP6 localhost.myservice > localhost.36082: Flags [S.], seq 3455514626, ack 3879998022, win 43690, options [mss 65476,sackOK,TS val 3800136568 ecr 3800136568,nop,wscale 7], length 0IP6 localhost.36082 > localhost.myservice: Flags [.], ack 1, win 342, options [nop,nop,TS val 3800136568 ecr 3800136568], length 0IP6 localhost.myservice > localhost.36082: Flags [P.], seq 1:14, ack 1, win 342, options [nop,nop,TS val 3800136571 ecr 3800136568], length 13IP6 localhost.36082 > localhost.myservice: Flags [.], ack 14, win 342, options [nop,nop,TS val 3800136571 ecr 3800136571], length 0IP6 localhost.myservice > localhost.36082: Flags [F.], seq 14, ack 1, win 342, options [nop,nop,TS val 3800136571 ecr 3800136571], length 0IP6 localhost.36082 > localhost.myservice: Flags [.], ack 15, win 342, options [nop,nop,TS val 3800136612 ecr 3800136571], length 0
Xinetd: End connection from server script
netcat;xinetd