diff options
| author | Sascha Schumann <sas@php.net> | 2001-05-18 23:38:46 +0000 |
|---|---|---|
| committer | Sascha Schumann <sas@php.net> | 2001-05-18 23:38:46 +0000 |
| commit | d5cfb03ac9126a2f0ff29bee873c36830fc037fe (patch) | |
| tree | 5f03ae6336c8ba8cc6d23cb656da18bae5101602 /ext/standard/basic_functions.c | |
| parent | d1697ad012854bea81dfbe7792dce96b6bb0701a (diff) | |
| download | php-git-d5cfb03ac9126a2f0ff29bee873c36830fc037fe.tar.gz | |
munmap() file in RSHUTDOWN, if PHPWRITE fails.
Diffstat (limited to 'ext/standard/basic_functions.c')
| -rw-r--r-- | ext/standard/basic_functions.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 355e4cff8f..5f1fec4ece 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -48,6 +48,9 @@ #if HAVE_LOCALE_H #include <locale.h> #endif +#if HAVE_SYS_MMAN_H +#include <sys/mman.h> +#endif #include "safe_mode.h" #ifdef PHP_WIN32 #include "win32/unistd.h" @@ -830,6 +833,9 @@ PHP_RINIT_FUNCTION(basic) BG(user_compare_func_name) = NULL; BG(array_walk_func_name) = NULL; BG(incomplete_class) = NULL; +#ifdef HAVE_MMAP + BG(mmap_file) = NULL; +#endif BG(page_uid) = -1; BG(page_inode) = -1; BG(page_mtime) = -1; @@ -897,6 +903,12 @@ PHP_RSHUTDOWN_FUNCTION(basic) BG(user_tick_functions) = NULL; } +#ifdef HAVE_MMAP + if (BG(mmap_file)) { + munmap(BG(mmap_file), BG(mmap_len)); + } +#endif + return SUCCESS; } |
