public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/10353] New: Methods for deleting all file descriptors greater than given integer
@ 2009-06-30 23:31 martinrb at google dot com
  2009-06-30 23:52 ` [Bug libc/10353] " roland at gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: martinrb at google dot com @ 2009-06-30 23:31 UTC (permalink / raw)
  To: glibc-bugs

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.


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-07-08 17:21 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-10353-131@http.sourceware.org/bugzilla/>
2014-07-01  7:54 ` [Bug libc/10353] Methods for deleting all file descriptors greater than given integer fweimer at redhat dot com
2019-04-12 14:46 ` adhemerval.zanella at linaro dot org
2020-11-03  9:34 ` [Bug libc/10353] Methods for deleting all file descriptors greater than given integer (closefrom) stsp at users dot sourceforge.net
2020-11-03  9:45 ` fweimer at redhat dot com
2020-12-16 16:39 ` crrodriguez at opensuse dot org
2020-12-16 16:40 ` crrodriguez at opensuse dot org
2020-12-16 17:07 ` adhemerval.zanella at linaro dot org
2021-07-08 17:21 ` adhemerval.zanella at linaro dot org
2009-06-30 23:31 [Bug libc/10353] New: Methods for deleting all file descriptors greater than given integer martinrb at google dot com
2009-06-30 23:52 ` [Bug libc/10353] " roland at gnu dot org
2009-07-01  5:58 ` drepper at redhat dot com
2009-07-01 22:22 ` martinrb at google dot com
2009-07-02  6:27 ` drepper at redhat dot com
2009-07-02 16:15 ` martinrb at google dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).