freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] Close on exec for font files


From: Scott Long
Subject: Re: [Devel] Close on exec for font files
Date: Wed, 26 Dec 2001 10:06:12 -0800

I believe what he means is that on UNIX when he fork()'s and then exec()'s, 
the FreeType file descriptors remain open since they have not been marked 
close-on-exec. He's probably spawning worker processes from a process that 
uses FreeType, and his problem is that all of FreeType's open files remain 
open in the child process. It seems like an issue of aesthetics.

You should be able to close all the open descriptors by calling 
FT_Done_FreeType() in the new process right before you exec().

Scott

On Wednesday 26 December 2001 02:37 am, you wrote:
> Hello Keith,
>
> Keith Packard a écrit :
> > I've noticed that FreeType leaves files open across exec.  Is there any
> > reason not to have them set to close automatically?  It would avoid some
> > (possible) access control issues and clean up the kernel file table a
> > bit.
>
> What do you mean "across exec" exactly ??
>
> By default, FreeType will keep each FT_Face's FT_Stream _open_ until it is
> destroyed (through FT_Done_Face). If you need to automatically close and
> open input streams while the corresponding face objects are alive, I
> strongly recommend you to implement this with a custom FT_Stream type..
>
> Generally speaking, I don't think that implementing such a "feature" has
> any thing to do in a font engine.. Custom streams can also be used to
> access compressed files, remote ones, etc.. so there is little reason
> to add another layer of complexity within the font engine and its modules
> to deal with all of these..
>
> But you may be talking about something different ?
>
>
> Regards,
>
> - David
>
> _______________________________________________
> Devel mailing list
> address@hidden
> http://www.freetype.org/mailman/listinfo/devel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]