Bug #1394: fclose() causes SIGSEGV esp. when run as apache module

From: Date: Mon, 10 May 1999 09:40:37 +0000
Subject: Bug #1394: fclose() causes SIGSEGV esp. when run as apache module
Groups: php.dev 
Request: Send a blank email to php-dev+get-5471@lists.php.net to get a copy of this message
From: bsidhi@openport.com Operating system: Linux PHP version: 3.0.7 PHP Bug Type: Reproduceable crash Bug description: fclose() causes SIGSEGV esp. when run as apache module this looks to be the same as #1313 it looks to me like the destructor for php3 fclose() is simply libc's fclose! functions/file.c GLOBAL(le_fp) = register_list_destructors(fclose,NULL); GLOBAL(le_pp) = register_list_destructors(__pclose,NULL); so i made it: GLOBAL(le_fp) = register_list_destructors(__fclose,NULL); GLOBAL(le_pp) = register_list_destructors(__pclose,NULL); and added: static void __fclose(FILE *fp) { TLS_VARS; fclose(fp); } that seems to fix it. of course, i have no clue what TLS_VARS is all about .. just copied from __pclose up above =:) -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#5471) next »