Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
a1dc66d0
Commit
a1dc66d0
authored
Feb 17, 2011
by
Leigh B Stoller
Browse files
Add a signal handler to make sure things are cleaned up.
parent
d83a6690
Changes
1
Hide whitespace changes
Inline
Side-by-side
protogeni/scripts/reservevlans.in
View file @
a1dc66d0
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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