Some initial changes to use CLO_EXEC, with an eye towards some day using it correctly.

This commit is contained in:
Peter Ammon
2012-03-02 00:27:40 -08:00
parent 36622c3578
commit 8b26d0104c
19 changed files with 356 additions and 280 deletions

View File

@@ -196,6 +196,7 @@ char *my_strdup( const char *s )
*/
static const char * search_ini( const char *filename, const char *match )
{
/* OK to not use CLO_EXEC here because mimedb is single threaded */
FILE *f = fopen( filename, "r" );
char buf[4096];
int len=strlen(match);
@@ -584,6 +585,7 @@ static char *get_description( const char *mimetype )
return 0;
}
/* OK to not use CLO_EXEC here because mimedb is single threaded */
fd = open( fn.c_str(), O_RDONLY );
// fprintf( stderr, "%s\n", fn );