NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/47805: /bin/sh descriptor leak
>Number: 47805
>Category: bin
>Synopsis: /bin/sh descriptor leak
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed May 08 04:55:00 +0000 2013
>Originator: YAMAMOTO Takashi
>Release: NetBSD current
>Organization:
>Environment:
>Description:
/bin/sh sometimes leak descriptors on redirection.
it causes silly renames on nfs and "git rebase -i" fail with ENOTEMPTY.
>How-To-Repeat:
$ fstat -p$$
USER CMD PID FD MOUNT INUM MODE SZ|DV R/W
takashi sh 5922 wd /home 2399488 drwxr-xr-x 8192 r
takashi sh 5922 0 /dev/pts 15 crw--w---- pts/6 rw
takashi sh 5922 1 /dev/pts 15 crw--w---- pts/6 rw
takashi sh 5922 2 /dev/pts 15 crw--w---- pts/6 rw
takashi sh 5922 1023 / 691216 crw-rw-rw- tty rw
$ echo 3>/dev/null
$ fstat -p$$
USER CMD PID FD MOUNT INUM MODE SZ|DV R/W
takashi sh 5922 wd /home 2399488 drwxr-xr-x 8192 r
takashi sh 5922 0 /dev/pts 15 crw--w---- pts/6 rw
takashi sh 5922 1 /dev/pts 15 crw--w---- pts/6 rw
takashi sh 5922 2 /dev/pts 15 crw--w---- pts/6 rw
takashi sh 5922 3 / 691212 crw-rw-rw- null w
takashi sh 5922 10 / 691212 crw-rw-rw- null w
takashi sh 5922 1023 / 691216 crw-rw-rw- tty rw
$
>Fix:
FreeBSD SVN rev 199953 seems like a fix for this problem.
http://lists.freebsd.org/pipermail/svn-src-head/2009-November/012085.html
>Unformatted:
Home |
Main Index |
Thread Index |
Old Index