# why MSHUTDOWN isn't called?

- Thread: https://externals.io/message/7139
- Original archive: https://news-web.php.net/php.internals/7139
- Started by david on 2004-01-16T20:45:39+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #7139 — david — 2004-01-16T20:45:39+00:00

URL: https://externals.io/message/7139#7139

i have noticed the MSHUTDOWN function of my extension isn't called if the 
.so in memory is different than those in disk. this can happen if i release 
a new .so and restart apache. for example, i observed the following:

1. cp .so to my extension dir
2. start apache
3. cp a new .so to my extension dir with bug fix
4. stop apache
5. start apache

for some reason, in step 4, the module's MSHUTDOWN function isn't called at 
all. the following, however, works fine:

1. cp .so to my extension dir
2. start apache
3. stop apache
4. cp a new .so to my extension dir with bug fix
5. start apache

the only differences is that in the second version, i stop apache before 
copying the new .so over. why does it matter? step 4 of my first version 
should have unloaded the old .so from memory and then picks up the new .so 
in step 5, but it's not doing that. does anyone know why?

david
-- 
sub'_{print"@_ ";* \ = * __ ,\ & \}
sub'__{print"@_ ";* \ = * ___ ,\ & \}
sub'___{print"@_ ";* \ = * ____ ,\ & \}
sub'____{print"@_,\n"}&{_+Just}(another)->(Perl)->(Hacker)
