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: Werner LEMBERG
Subject: Re: [Devel] Close on exec for font files
Date: Thu, 03 Jan 2002 17:07:07 +0100 (CET)

> > 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 ??

F_SETFD of fcntl() is POSIX.1 -- since Emacs uses it I'm fairly sure
it will work everywhere.  The above code is incorrect BTW; here a
corrected version:


  #ifdef F_SETFD

  #ifndef FD_CLOEXEC
  #define FD_CLOEXEC  1
  #endif

  (void)fcntl( fileno( file ), F_SETFD, FD_CLOEXEC );

  #endif /* F_SETFD */


    Werner



reply via email to

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