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
27b47f60
Commit
27b47f60
authored
Sep 26, 2012
by
Gary Wong
Browse files
Silly bugfix in $pidfile naming.
parent
9b7922ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils/tcppd.in
View file @
27b47f60
...
...
@@ -35,6 +35,7 @@ use POSIX;
my
$TB
=
"
@prefix
@
";
my
$NC
=
"
@NC
@
";
my
$PORT
=
4127
;
my
$pidfile
=
"
/var/run/tcppd.pid
";
#
# Turn off line buffering on output
...
...
@@ -69,7 +70,8 @@ my $ctrl = new IO::Socket::INET( LocalAddr => '127.0.0.1',
# Write our PID to a known location (to assist those who would kill us).
# Don't bother attempting to use the PID file as a lock -- the socket
# we just listened on makes a better mutex than a file would.
sysopen
(
PIDFILE
,
"
/var/run/tcppd.pid
",
O_WRONLY
|
O_CREAT
)
||
sysopen
(
PIDFILE
,
$pidfile
,
O_WRONLY
|
O_CREAT
)
||
fatal
("
Couldn't create '
$pidfile
': $? $!
\n
");
print
PIDFILE
"
$$
";
close
PIDFILE
;
...
...
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