FCGI::...Manager(3pm)
π 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 aSIGTERMto 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 aSIGTERMto each of its children, sets analarm(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 aSIGKILLto each of the remaining children, and exits with return status1. π that's the not-so-subtle route.
- if all children die before this timeout, the process manager exits with return status
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 theFCGI::ProcManagercode, 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 AND LICENSE π
Copyright 2007-2010 by Infinity Interactive, Inc.
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
- debian bookworm: libfcgi-engine-perl 0.22-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libfcgi-engine-perl 0.22-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libfcgi-engine-perl 0.22-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libfcgi-engine-perl 0.22-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libfcgi-engine-perl 0.22-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms