Re: closing extra fd's in gnome_execute_*
- From: Manish Vachharajani <mvachhar vger rutgers edu>
- To: Elliot Lee <sopwith redhat com>
- cc: gnome-list gnome org, recipient list not shown: ;
- Subject: Re: closing extra fd's in gnome_execute_*
- Date: Tue, 12 Jan 1999 17:39:13 -0500 (EST)
On 12 Jan 1999, Elliot Lee wrote:
> On Tue, 12 Jan 1999 00:06:04 -0500 (EST), Manish Vachharajani
> <mvachhar@vger.rutgers.edu> wrote:
>
> >Also, should the gnome_client stuff set CLOEXEC on all the ICE fds by
> >default? Do we ever want to inherit those on exec? I don't think so.
>
> In my perfect world, the CLOEXEC flag would be the default. However, there
> are reasons, historical and otherwise, why it is the way it is.
>
> IMHO CLOEXEC should be set on all fd's except 0,1,2 (the stdin/stdout/stderr
> of children should remain the same as their parents except under unusual
> circumstances), and pipes. X/ICE/CORBA/whatever fd's should be set CLOEXEC.
Well, we can fix CORBA, and change the flags for X in gtk+. I don't know
if there is anything we can do about ICE and other wrapped connections
though.
> As far as your "sysconf(SC_OPEN_MAX) will help us close all fd's" comment,
> note that closing even 1024 fd's will take a little bit of time, and when
> SC_OPEN_MAX goes up to 1 billion, it is going to become plain impractical :)
I agree, but for now the hack is there until all the CLOEXEC issues can be
resolved. Once that is finished we can remove the CLOEXEC stuff. For
some reason I thought sysconf(_SC_OPEN_MAX) would return the greatest open
file descriptor, oops. BTW, this sysconf code is straight from
gnome-pty-helper, so I guess we need to fix that too :) See my other
email for some more collected thoughts.
> Hope this helps,
> -- Elliot
> "In film you will find four basic story lines. Man versus man, man
> versus nature, nature versus nature, and dog versus vampire."
> - Steven Spielberg
>
>
> --
> FAQ: Frequently-Asked Questions at http://www.gnome.org/gnomefaq
> To unsubscribe: mail gnome-list-request@gnome.org with
> "unsubscribe" as the Subject.
>
Manish Vachharajani Some Haiku: A crash reduces
<mvachhar@vger.rutgers.edu> your expensive computer
to a simple stone - Unknown
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]