Skip to content
Snippets Groups Projects
Commit 406912b2 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Fixed typo & added missing signal handler

parent 74be726e
No related branches found
No related tags found
No related merge requests found
......@@ -308,7 +308,7 @@ sub task_child_close
# Reap the dead child
sub task_handle_sigchld
sub task_handle_SIGCHLD
{
my ($kernel,$heap,$pid,$status) = @_[KERNEL,HEAP,ARG1,ARG2];
my $task = $heap->{task_by_pid}->{$pid};
......@@ -326,5 +326,22 @@ sub task_handle_sigchld
}
# Handle SIGINT
sub task_handle_SIGINT
{
my ($kernel,$heap,$signal_name) = @_[KERNEL,HEAP,ARG0];
# Shutdown stdin on all children, this will terminate /sbin/tc
foreach my $task_id (keys %{$heap->{'task_by_wid'}}) {
my $task = $heap->{'task_by_wid'}{$task_id};
# $kernel->sig_child($task->PID, "asig_child");
# $task->kill("INT"); #NK: doesn't work
$kernel->post($task,"shutdown_stdin"); #NK: doesn't work
}
$logger->log(LOG_WARN,"[TCSTATS] Killed children processes");
}
1;
# vim: ts=4
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment