# [FPM] when to call extensions MINIT and MSHUTDOWN

- Thread: https://externals.io/message/50136
- Original archive: https://news-web.php.net/php.internals/50136
- Started by jerome@loyet.net on 2010-11-11T00:01:32+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

---

## #50136 — jerome@loyet.net — 2010-11-11T00:01:32+00:00

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

Hi guys,

I'm sure when FPM should call extensions MINIT and MSHUTDOWN functions.

MINIT is called once by the master process after it forks any
children. It's done by calling php_module_startup() in
cgi_sapi_module.startup().
MSHUTDOWN is also called by the master process before exiting and
after it kills all its children. It's done by calling
php_module_shutdown_wrapper();

Is it normal behaviour ? Or should MINIT and MSHUTDOWN be also called
in each child process somehow ?

Thanks
++ Jerome
