Bug 345181 - More than 2 digit Filedescriptors can not be closed
Summary: More than 2 digit Filedescriptors can not be closed
Keywords:
Status: CLOSED DUPLICATE of bug 217394
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: bash
Version: 5.0
Hardware: All
OS: Linux
low
high
Target Milestone: ---
: ---
Assignee: Tomas Janousek
QA Contact: Chris Ward
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-10-22 13:29 UTC by Roland Friedwagner
Modified: 2012-05-19 23:25 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-10-29 16:35:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
bash script testing for the 2digit FD bug (397 bytes, application/x-shellscript)
2007-10-22 13:29 UTC, Roland Friedwagner
no flags Details

Description Roland Friedwagner 2007-10-22 13:29:55 UTC
Description of problem:

Filedescriptors with more than 2 digits can not be closed.

Version-Release number of selected component (if applicable):

GNU bash, version 3.1.17(1)-release (i686-redhat-linux-gnu)

How reproducible:

[root@xxx tmp]# exec 11>foobar
[root@xxx tmp]# lsof -p $$ -a -d 11
COMMAND  PID USER   FD   TYPE DEVICE SIZE   NODE NAME
bash    3493 root   11w   REG  253,1    0 573448 /tmp/foobar
[root@xxx tmp]# exec 11>&-
# => FD 11 should be closed now !
[root@xxx tmp]# lsof -p $$ -a -d 11
COMMAND  PID USER   FD   TYPE DEVICE SIZE   NODE NAME
bash    3493 root   11w   REG  253,1    0 573448 /tmp/foobar

Works fine with RHEL4 and RHEL3(not shown):

[root@rhel4 tmp]# bash --version
GNU bash, version 3.00.15(1)-release (i386-redhat-linux-gnu)
Copyright (C) 2004 Free Software Foundation, Inc.
[root@rhel4 tmp]# exec 11>foobar
[root@rhel4 tmp]# lsof -p $$ -a -d 11
COMMAND  PID USER   FD   TYPE DEVICE SIZE    NODE NAME
bash    3929 root   11w   REG  253,1    0 1196040 /tmp/foobar
[root@rhel4 tmp]# exec 11>&-
[root@rhel4 tmp]# lsof -p $$ -a -d 11
[root@rhel4 tmp]#


Additional info:

 - I've attached an script testing for the bug (bash2digitfdbug.sh).
 - Bug does not show up on Ubuntu 7.04 provided bash:
   GNU bash, version 3.2.13(1)-release (i486-pc-linux-gnu)

Kind Regards, Roland

Comment 1 Roland Friedwagner 2007-10-22 13:29:55 UTC
Created attachment 234061 [details]
bash script testing for the 2digit FD bug

Comment 2 Roland Friedwagner 2007-10-22 13:45:00 UTC
Bug only shows up wenn working as root user :-O

Comment 3 Roland Friedwagner 2007-10-22 14:27:06 UTC
(In reply to comment #2)
> Bug only shows up wenn working as root user :-O
Bug is independent of user id!
(But my test script not;-)

Comment 5 RHEL Program Management 2007-10-23 14:54:50 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 6 Tomas Janousek 2007-10-29 16:35:43 UTC

*** This bug has been marked as a duplicate of 217394 ***


Note You need to log in before you can comment on or make changes to this bug.