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
bb98488c
Commit
bb98488c
authored
Jun 06, 2002
by
Leigh B. Stoller
Browse files
Store the watchdog pid in /var/run.
parent
88bb4215
Changes
1
Hide whitespace changes
Inline
Side-by-side
tmcd/ron/watchdog
View file @
bb98488c
...
...
@@ -40,6 +40,7 @@ use libsetup;
my
$timeout
=
(
60
*
30
);
# In seconds of course.
my
$logname
=
"
/tmp/emulab-watchdog.debug
";
my
$vndir
=
"
/var/testbed
";
my
$pidfile
=
"
/var/run/emulab-watchdog.pid
";
#
# Parse command arguments. Once we return from getopts, all that should be
...
...
@@ -67,6 +68,16 @@ if (1 && TBBackGround($logname)) {
exit
(
0
);
}
#
# Write our pid into the pid file so we can be killed later (when the
# experiment is torn down). We must do this first so that we can be
# killed before we change the sig handlers
#
open
(
PFILE
,
"
>
$pidfile
")
or
die
("
Could not open
$pidfile
: $!
");
print
PFILE
"
$PID
\n
";
close
(
PFILE
);
#
#
# Inform TMCD that we have rebooted, and are starting testbed setup.
...
...
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