This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/10353] New: Methods for deleting all file descriptors greater than given integer
- From: "martinrb at google dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 30 Jun 2009 23:31:09 -0000
- Subject: [Bug libc/10353] New: Methods for deleting all file descriptors greater than given integer
- Reply-to: sourceware-bugzilla at sourceware dot org
Recent Solaris provides a way to delete all file descriptors
greater than a given integer, and provides a way to ask
posix_spawn to do so. I believe glibc should implement these extensions.
Both of the big programs I have worked on, xemacs and openjdk,
have written their own way to do this.
extern int posix_spawn_file_actions_addclosefrom_np(
posix_spawn_file_actions_t *file_actions,
int lowfiledes);
extern void closefrom(int);
http://docs.sun.com/app/docs/doc/819-2243/posix-spawn-file-actions-addclosefrom-np-3c?l=ja&a=view
http://docs.sun.com/app/docs/doc/819-2243/closefrom-3c?l=ja&a=view
The functionality that has been added to glibc allowing FD_CLOSE_ON_EXEC
to be specified at time of creation of the fd does help (thank you)
but it is not sufficient for "open" programs like the JDK where
arbitrary third party native code may be concurrently opening file
descriptors while creating a subprocess.
--
Summary: Methods for deleting all file descriptors greater than
given integer
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: martinrb at google dot com
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=10353
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.