diff options
| author | fukachan <fukachan> | 2005-12-18 11:52:49 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2005-12-18 11:52:49 +0000 |
| commit | f23ae8a6058a804a61ea80a5fcf7e469fbcb139c (patch) | |
| tree | 13ca67cbf760d1bbae39f573416064ba123d94ec /fml/lib | |
| parent | 73804b0d92580ea28c833bdc4cf0f2ab5e1d888c (diff) | |
| download | fml8-f23ae8a6058a804a61ea80a5fcf7e469fbcb139c.tar.gz fml8-f23ae8a6058a804a61ea80a5fcf7e469fbcb139c.tar.bz2 fml8-f23ae8a6058a804a61ea80a5fcf7e469fbcb139c.zip | |
NewProcess() takes hints as args to overload configuration in a new process.
Diffstat (limited to 'fml/lib')
| -rw-r--r-- | fml/lib/FML/Process/Switch.pm | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/fml/lib/FML/Process/Switch.pm b/fml/lib/FML/Process/Switch.pm index c9bafb5a..30892f87 100644 --- a/fml/lib/FML/Process/Switch.pm +++ b/fml/lib/FML/Process/Switch.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Switch.pm,v 1.110 2005/08/11 04:14:43 fukachan Exp $ +# $FML: Switch.pm,v 1.111 2005/12/17 13:47:32 fukachan Exp $ # package FML::Process::Switch; @@ -251,11 +251,12 @@ restart new another process (switch to it on running). # Descriptions: restart new another process (switch to it on running). # Arguments: OBJ($curproc) # STR($new_myname) STR($ml_name) STR($ml_domain) +# HASH_REF($hints) # Side Effects: none # Return Value: none sub NewProcess { - my ($curproc, $new_myname, $ml_name, $ml_domain) = @_; + my ($curproc, $new_myname, $ml_name, $ml_domain, $hints) = @_; my $ml_addr = sprintf("%s@%s", $ml_name, $ml_domain); use File::Basename; @@ -270,6 +271,13 @@ sub NewProcess $args->{ program_fullname } =~ s/$old_myname/$new_myname/; $args->{ argv } = [ $ml_addr ]; $args->{ ARGV } = [ $ml_addr ]; + $args->{ curproc } = {}; + + # overload options + my $_opts = $hints->{ config_overload } || {}; + for my $k (keys %$_opts) { + $args->{ options }->{ o }->{ $k } = $_opts->{ $k }; + } # start a new process. eval q{ |
