Commit a1dc66d0 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Add a signal handler to make sure things are cleaned up.

parent d83a6690
......@@ -163,6 +163,18 @@ if (!defined($vlan)) {
fatal("Could not create vlan for $linkname");
}
my $lanid = $vlan->lanid();
#
# Setup a signal handler to clean things up.
#
sub handler()
{
fatal("Caught a signal ... cleaning up and exiting");
}
$SIG{HUP} = \&handler;
$SIG{TERM} = \&handler;
$SIG{INT} = \&handler;
my @othertags = ();
while (my @tags = ReserveLocalTags(@othertags)) {
......@@ -194,6 +206,8 @@ sub ReserveRemoteTags($$@)
$method_args->{'taglist'} = \@tags;
@$othertags = ();
print STDERR "Calling $authority with tags: @tags\n";
my $response =
Genixmlrpc::CallMethod($authority->url(),
undef, "ReserveVlanTags", $method_args);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment