Myriad::Bootstrap - starts up a Myriad child process ready for loading modules for the main functionality
Controller process for managing an application.
Provides a minimal parent process which starts up a child process for running the real application code. A pipe is maintained between parent and child for exchanging status information, with a secondary UNIX domain socket for filedescriptor handover.
The parent process loads only two additional modules - strict and warnings - with the rest of the app-specific modules being loaded in the child. This is enforced: any other modules found in
%INC will cause the process to exit immediately.
HUP- Request to recycle all child processes
TERM- Shut down all child processes gracefully
KILL- Immediate shutdown for all child processes
The purpose of this class is to support development usage: it provides a minimal base set of code that can load up the real modules in separate forks, and tear them down again when dependencies or local files change.
We avoid even the standard CPAN modules because one of the changes we're watching for is
cpanfile content changing, if there's a new module or updated version we want to be very sure that it's properly loaded.
One thing we explicitly don't try to do is handle Perl version or executable changing from underneath us - so this is very much a fork-and-call approach, rather than fork-and-exec.
Add modules to the whitelist.
Takes a list of module names in the same format as
Don't ever use this.
use socketpair to establish communication between parent/child later.
Takes a pipe and makes it nonblocking by applying
Given a target coderef or classname, prepares the fork and communication pipe, then starts the code.
Deriv Group Services Ltd.
Copyright Deriv Group Services Ltd 2020-2021. Licensed under the same terms as Perl itself.