httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <>
Subject Re: inherited file descriptors on win32...
Date Sun, 10 May 1998 20:12:37 GMT
On Mon, 11 May 1998, Wan-Teh Chang wrote:

>     typedef enum {
>     } PRFileDescInheritibility;

This sounds good.

You know, I'm really surprised that even Solaris doesn't have a method
of setting the default FD_CLOEXEC flag on file descriptors -- Sun has
been doing threaded stuff for quite some time.  It just seems odd that
they wouldn't have a way to set the default, but I can't find any.
For non-threaded apps on unix, the default of inheriting across exec
is fine because there usually aren't a lot of descriptors to close
after fork().  But for threaded apps, aie!  This is a total mess.

Either we do another fcntl() for each file descriptor we open, or we do a
lot of close()s after fork().  Both suck.

I'm going to pester some of the linux kernel folks.

> By the way, Dean, the process management and file
> descriptor inheritance functions in NSPR are not used
> by any products.  The process management
> functions (create, wait, kill) are all implemented.
> The descriptor inheritance functions (they might be
> "process attributes") are not completely implemented
> yet.  I think I only implemented standard I/O redirection.
> But it is not hard to implement the remaining ones for
> Unix and Win32.

Yeah I noticed last night that PR_SetInheritableFileDesc and
PR_GetInheritedFileDesc weren't there :)  I wanted to see how you
implemented them.


View raw message