This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
gdb/807: leaked file descriptors
- From: linux_4ever at yahoo dot com
- To: gdb-gnats at sources dot redhat dot com
- Date: 28 Oct 2002 15:31:20 -0000
- Subject: gdb/807: leaked file descriptors
- Reply-to: linux_4ever at yahoo dot com
>Number: 807
>Category: gdb
>Synopsis: leaked file descriptors
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Oct 28 07:38:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Steve Grubb
>Release: unknown-1.0 - Whatever RedHat 8.0 ships
>Organization:
>Environment:
RedHat 8.0 Linux on i386 arch
>Description:
gdb appears to leak 2 file descriptors when it opens a program to be debugged. Both file descriptors are pointing to the file being debugged.
>How-To-Repeat:
I used the env_audit program from http://www.web-insights.net/env_audit. It includes instructions to duplicate this in the examples directory of the tarball.
>Fix:
I would suggest applying a fcntl FD_CLOEXEC when opening a file.
>Release-Note:
>Audit-Trail:
>Unformatted: