Description of problem: runtest leaks fd Version-Release number of selected component (if applicable): dejagnu-1.5.1-3.fc20.noarch expect-5.45-10.fc20.x86_64 tcl-8.5.14-1.fc20.x86_64 How reproducible: Always. Steps to Reproduce: echo 'remote_exec target "ls -l /proc/self/fd/"' >dejagnuleak.exp runtest dejagnuleak.exp cat testrun.log Actual results: lrwx------ 1 jkratoch jkratoch 64 Aug 26 21:15 0 -> /dev/pts/5 lrwx------ 1 jkratoch jkratoch 64 Aug 26 21:15 1 -> /dev/pts/5 lrwx------ 1 jkratoch jkratoch 64 Aug 26 21:15 2 -> /dev/pts/5 lrwx------ 1 jkratoch jkratoch 64 Aug 26 21:15 3 -> /dev/pts/2 lr-x------ 1 jkratoch jkratoch 64 Aug 26 21:15 4 -> /proc/25522/fd Expected results: lrwx------ 1 jkratoch jkratoch 64 Aug 26 21:15 0 -> /dev/pts/5 lrwx------ 1 jkratoch jkratoch 64 Aug 26 21:15 1 -> /dev/pts/5 lrwx------ 1 jkratoch jkratoch 64 Aug 26 21:15 2 -> /dev/pts/5 lr-x------ 1 jkratoch jkratoch 64 Aug 26 21:15 3 -> /proc/25522/fd Additional info: With RHEL-5/6 versions the fd leak was worse - many fds.
Created attachment 934436 [details] fd leak patch I found out that the problem isn't in dejagnu. The problem seems to be in expect. The problem can be reproduced also by: echo 'remote_exec target "ls -l /proc/self/fd/"' >dejagnuleak.exp expect -- /usr/share/dejagnu/runtest.exp dejagnuleak.exp Attached patch solves the problem in Fedora 20. I haven't tested it in RHEL. Reassigning to expect...