[Bug 9331] New: tcpudp: daemon leaks fd temporarily; keeping connection open

bugzilla at busybox.net bugzilla at busybox.net
Wed Oct 5 13:40:29 UTC 2016


https://bugs.busybox.net/show_bug.cgi?id=9331

            Bug ID: 9331
           Summary: tcpudp: daemon leaks fd temporarily; keeping
                    connection open
           Product: Busybox
           Version: unspecified
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Networking
          Assignee: unassigned at busybox.net
          Reporter: enrico.scholz at sigma-chemnitz.de
                CC: busybox-cvs at busybox.net
  Target Milestone: ---

Created attachment 6741
  --> https://bugs.busybox.net/attachment.cgi?id=6741&action=edit
patch

When the concurrency feature (-c) is used, the 'tcpsvd' parent process
will keep the last connection open until slots are free.

This is unwanted, especially in '-c 1' cases.  E.g.

$ cat <<EOF > /tmp/test
#! /bin/sh

# do something
sleep 10

# close file descriptor
exec 0<&-
exec 1>&-

# do some other thing
exec sleep 3600
EOF

$ chmod a+x /tmp/test

$ tcpsvd -v -c 2 0 8001 /tmp/test

----

$ nc <ip> 8001 < /dev/null &
$ nc <ip> 8001 < /dev/null &


-->  The first 'nc' will return after 10 seconds, but the second will wait
until '/tmp/test' finishes (--> 3600s).

Attached patch fixes this.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the busybox-cvs mailing list