FCGI::...Manager(3pm)

πŸ“¦
version 0.22 Β· 2 versions
  • 0.22 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.22 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

ok so bestie, this is FCGI::Engine::ProcManager β€” the module for managing FastCGI applications. that's the whole vibe. πŸŽ€


✨ DESCRIPTION ✨

so like, this module is a refactoring of FCGI::ProcManager. it behaves exactly the same, no cap β€” but the API is a little different, and that difference is kinda the whole point. 🌸

the function-oriented API? gone. removed. it's not coming back. instead we have an object-oriented API, which is honestly the main character move. πŸ‘‘

also, the "pm_" prefix has been removed from the hook routines β€” instead they now use the "augment" and "inner" functionality from Moose. very demure, very Moose. πŸ¦‹

more docs will come eventually. fr fr. πŸ™ˆ

🌈 Signal Handling

FCGI::Engine::ProcManager attempts to do the right thing for proper shutdowns. it's trying its best and honestly? it's slaying.

  • when it receives a SIGHUP, it sends a SIGTERM to each of its children, and then resumes its normal operations. like, bye girlies, but also, i'm not going anywhere. πŸ’…
  • when it receives a SIGTERM, it sends a SIGTERM to each of its children, sets an alarm(3) "die timeout" handler, and waits for each of its children to die.
    • if all children die before this timeout, the process manager exits with return status 0. πŸŽ‰
    • if all children do not die by the time the "die timeout" occurs, the process manager sends a SIGKILL to each of the remaining children, and exits with return status 1. πŸ’€ that's the not-so-subtle route.

FCGI::Engine::ProcManager uses POSIX::sigaction() to override the default SA_RESTART policy used for perl's %SIG behavior. specifically: the process manager never uses SA_RESTART, while the child FastCGI servers turn off SA_RESTART around the accept loop, but re-enstate it otherwise. 🌟

the desired (and implemented) effect is to give a request as big a chance as possible to succeed and to delay their exits until after their request β€” while allowing the FastCGI servers waiting for new requests to die right away. it's giving ✨graceful✨.


🫢 METHODS 🫢

i will fill this in more eventually, but for now if you really wanna know, read the source. iykyk. 😭


🌸 SEE ALSO 🌸

  • FCGI::ProcManager β€” this module is a fork of the FCGI::ProcManager code, with lots of code cleanup as well as general Moosificaition. obsessed. πŸ’–

😭 BUGS 😭

all complex software has bugs lurking in it, and this module is no exception. if you find a bug please either email me, or add the bug to cpan-RT. don't be shy, bestie, i wanna know. πŸ™ˆ


πŸ‘‘ AUTHOR πŸ‘‘

Stevan Little <stevan@iinteractive.com>


Copyright 2007-2010 by Infinity Interactive, Inc.

<http://www.iinteractive.com>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


and that's the whole page, bestie!! ✨ this one's from perl v5.36.0, dated 2022-12-10 β€” vintage but iconic, we love a classic πŸ’œ mwah, go manage some processes πŸ’…πŸŒˆ

πŸ“¦ where this page comes from