[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] Close on exec for font files
From: |
David Turner |
Subject: |
Re: [Devel] Close on exec for font files |
Date: |
Thu, 03 Jan 2002 18:37:43 +0100 |
Hello Scott and Keith,
Thanks for the clarification on the "close on exec" problem. It's clear
that we need to change the Unix implementation of FT_New_Stream.
> Then I think your fcntl() approach is the best, and you can apply it in
> ftsystem.c in the function Ft_New_Stream().
>
> After the call to fopen() just say:
>
> long close_flag = FD_CLOEXEC;
> fcntl(fileno(file), F_SETFD, &close_flag);
>
I'm ready to add such code to the FreeType sources, however I'd like
to know wether these calls are Linux specific, available on all Unices,
and if they require specific Autoconf voodoo to properly nest them
in #if .. #endif controls ??
until one of you (or one of our Unix gurus) answer this question, I won't
touch the code directly. And as usual, patches are welcomed :o)
> I've always thought it would be nice to be able to register functions to get
> called after fork(). FreeType could register its own function to close all
> its resources. You can do this with pthreads if you have it, with
> pthread_atfork().
>
Thanks for the pointer, it's unlikely that such a thing might be directly
supported by FreeType but it's interesting to know. Maybe something to put
in the MLib in the near future..
Regards,
- David
- Re: [Devel] Close on exec for font files,
David Turner <=