Bug 345181 - More than 2 digit Filedescriptors can not be closed
More than 2 digit Filedescriptors can not be closed
Status: CLOSED DUPLICATE of bug 217394
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: bash (Show other bugs)
5.0
All Linux
low Severity high
: ---
: ---
Assigned To: Tomas Janousek
Chris Ward
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-22 09:29 EDT by Roland Friedwagner
Modified: 2012-05-19 19:25 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-10-29 12:35:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Roland Friedwagner 2007-10-22 09:29:55 EDT
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 09:29:55 EDT
Created attachment 234061 [details]
bash script testing for the 2digit FD bug
Comment 2 Roland Friedwagner 2007-10-22 09:45:00 EDT
Bug only shows up wenn working as root user :-O
Comment 3 Roland Friedwagner 2007-10-22 10:27:06 EDT
(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 Product and Program Management 2007-10-23 10:54:50 EDT
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 12:35:43 EDT

*** 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.