summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-02-16 13:50:04 +0000
committerfukachan <fukachan>2001-02-16 13:50:04 +0000
commited1572b39a2685f3346c17ed6da2dc7e7b7d9ed7 (patch)
treefe83558acaf5cee3e5c8fde55eebe58a2290da99
parente145f1c89677145048ee78cc47ef83a90f80b69d (diff)
downloadfml8-ed1572b39a2685f3346c17ed6da2dc7e7b7d9ed7.tar.gz
fml8-ed1572b39a2685f3346c17ed6da2dc7e7b7d9ed7.tar.bz2
fml8-ed1572b39a2685f3346c17ed6da2dc7e7b7d9ed7.zip
signal initialize
-rw-r--r--fml/lib/FML/Process/Kernel.pm17
-rw-r--r--regress/simulation/TODO9
2 files changed, 17 insertions, 9 deletions
diff --git a/fml/lib/FML/Process/Kernel.pm b/fml/lib/FML/Process/Kernel.pm
index 0fc4cb6d..397958c5 100644
--- a/fml/lib/FML/Process/Kernel.pm
+++ b/fml/lib/FML/Process/Kernel.pm
@@ -58,6 +58,9 @@ sub new
# load config.cf files, which is passed from loader.
$curproc->load_config_files( $args->{ cf_list } );
+ # initialize signal
+ $curproc->_signal_init;
+
# debug
if ($0 =~ /loader/) { $curproc->debug; sleep 3;}
@@ -65,6 +68,20 @@ sub new
}
+# default signal handling
+sub _signal_init
+{
+ my ($curproc, $args) = @_;
+
+ $SIG{'ALRM'} = $SIG{'INT'} = $SIG{'QUIT'} = $SIG{'TERM'} = sub {
+ my ($signal) = @_;
+ Log("SIG$signal trapped");
+ sleep 1;
+ croak("SIG$signal trapped");
+ };
+}
+
+
sub prepare
{
my ($curproc, $args) = @_;
diff --git a/regress/simulation/TODO b/regress/simulation/TODO
index 4657c057..e9ee1d8d 100644
--- a/regress/simulation/TODO
+++ b/regress/simulation/TODO
@@ -15,19 +15,12 @@ mode-html-generator
alarm()
-
-default signal handling
- $SIG{'ALRM'} = 'Tick';
- $SIG{'INT'} = $SIG{'QUIT'} = $SIG{'TERM'} = 'SignalLog';
-
MIME Content Handler(include backword compatible)
log suffix extension
-
chaddr を認証の前にトラップすること( libtrap.pl )
-
5.0 では ReloadMySelf() って必要ないような気がするが…
@@ -51,5 +44,3 @@ Resolved -- the Request has either been answered or successfully
use "stalled" to indicate that this request isn't one can
make any progress at the moment, thus isn't worth picking
from the queue to work on.
-
-