Re: closing extra fd's in gnome_execute_*

On Tue, 12 Jan 1999 00:06:04 -0500 (EST), Manish Vachharajani
<> 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.

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 :)

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

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]