Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Charl
opentrafficshaper
Commits
406912b2
Commit
406912b2
authored
Nov 11, 2013
by
Nigel Kukard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed typo & added missing signal handler
parent
74be726e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
opentrafficshaper/plugins/tcstats/tcstats.pm
opentrafficshaper/plugins/tcstats/tcstats.pm
+18
-1
No files found.
opentrafficshaper/plugins/tcstats/tcstats.pm
View file @
406912b2
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment