Skip to content
GitLab
Menu
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
4b83580a
Commit
4b83580a
authored
Aug 28, 2017
by
Leigh B Stoller
Browse files
Wrap schema load with an alarm to avoid 60 second hang up until
connection times out. Lets use 5 seconds for now.
parent
c05b40bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
protogeni/scripts/rspeclint.in
View file @
4b83580a
#!/usr/bin/perl -w
#
# Copyright (c) 2011 University of Utah and the Flux Group.
# Copyright (c) 2011
-2017
University of Utah and the Flux Group.
#
# {{{GENIPUBLIC-LICENSE
#
...
...
@@ -27,7 +27,7 @@
#
# }}}
#
#
use English;
use
English
;
use
Getopt::
Std
;
use
XML::
LibXML
;
use
XML::LibXML::
XPathContext
;
...
...
@@ -82,7 +82,10 @@ sub addSchema($$)
if
(
!
exists
(
$ns2file
{
$ns
}))
{
my
$schema
;
eval
{
local
$SIG
{
ALRM
}
=
sub
{
die
("
Timed out
\n
");
};
alarm
5
;
$schema
=
XML::LibXML::
Schema
->
new
(
location
=>
$file
);
alarm
0
;
};
if
(
$@
)
{
die
("
Failed to load schema for namespace
$ns
from location
$file
\n
: $@
");
...
...
Write
Preview
Supports
Markdown
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