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
45cf5f54
Commit
45cf5f54
authored
Sep 03, 2008
by
Leigh B. Stoller
Browse files
Remove the pidfile when exiting.
parent
0fad6182
Changes
1
Hide whitespace changes
Inline
Side-by-side
event/proxy/evproxy.c
View file @
45cf5f54
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2003-200
7
University of Utah and the Flux Group.
* Copyright (c) 2003-200
8
University of Utah and the Flux Group.
* All rights reserved.
*/
...
...
@@ -198,11 +198,11 @@ main(int argc, char **argv)
/*
* Stash the pid away.
*/
if
(
pidfile
)
strcpy
(
buf
,
pidfile
);
else
if
(
!
pidfile
)
{
sprintf
(
buf
,
"%s/evproxy.pid"
,
_PATH_VARRUN
);
fp
=
fopen
(
buf
,
"w"
);
pidfile
=
buf
;
}
fp
=
fopen
(
pidfile
,
"w"
);
if
(
fp
!=
NULL
)
{
fprintf
(
fp
,
"%d
\n
"
,
getpid
());
(
void
)
fclose
(
fp
);
...
...
@@ -214,6 +214,7 @@ main(int argc, char **argv)
select
(
0
,
NULL
,
NULL
,
NULL
,
&
tv
);
}
unlink
(
pidfile
);
/* Unregister with the remote event system: */
if
(
event_unregister
(
bosshandle
)
==
0
)
{
...
...
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