Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
632ac690
Unverified
Commit
632ac690
authored
Oct 20, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
monitord: do not hide global variable
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
edae86e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
lxc_monitord.c
src/lxc/cmd/lxc_monitord.c
+11
-11
No files found.
src/lxc/cmd/lxc_monitord.c
View file @
632ac690
...
...
@@ -80,7 +80,7 @@ struct lxc_monitor {
struct
lxc_epoll_descr
descr
;
};
static
struct
lxc_monitor
mon
;
static
struct
lxc_monitor
mon
itor
;
static
int
quit
;
static
int
lxc_monitord_fifo_create
(
struct
lxc_monitor
*
mon
)
...
...
@@ -349,7 +349,7 @@ static int lxc_monitord_mainloop_add(struct lxc_monitor *mon)
static
void
lxc_monitord_cleanup
(
void
)
{
lxc_monitord_delete
(
&
mon
);
lxc_monitord_delete
(
&
mon
itor
);
}
static
void
lxc_monitord_sig_handler
(
int
sig
)
...
...
@@ -415,15 +415,15 @@ int main(int argc, char *argv[])
ret
=
EXIT_FAILURE
;
memset
(
&
mon
,
0
,
sizeof
(
mon
));
mon
.
lxcpath
=
lxcpath
;
if
(
lxc_mainloop_open
(
&
mon
.
descr
))
{
memset
(
&
mon
itor
,
0
,
sizeof
(
monitor
));
mon
itor
.
lxcpath
=
lxcpath
;
if
(
lxc_mainloop_open
(
&
mon
itor
.
descr
))
{
ERROR
(
"Failed to create mainloop"
);
goto
on_error
;
}
mainloop_opened
=
true
;
if
(
lxc_monitord_create
(
&
mon
))
if
(
lxc_monitord_create
(
&
mon
itor
))
goto
on_error
;
monitord_created
=
true
;
...
...
@@ -437,22 +437,22 @@ int main(int argc, char *argv[])
;
close
(
pipefd
);
if
(
lxc_monitord_mainloop_add
(
&
mon
))
{
if
(
lxc_monitord_mainloop_add
(
&
mon
itor
))
{
ERROR
(
"Failed to add mainloop handlers"
);
goto
on_error
;
}
NOTICE
(
"lxc-monitord with pid %d is now monitoring lxcpath %s"
,
lxc_raw_getpid
(),
mon
.
lxcpath
);
lxc_raw_getpid
(),
mon
itor
.
lxcpath
);
for
(;;)
{
ret
=
lxc_mainloop
(
&
mon
.
descr
,
1000
*
30
);
ret
=
lxc_mainloop
(
&
mon
itor
.
descr
,
1000
*
30
);
if
(
ret
)
{
ERROR
(
"mainloop returned an error"
);
break
;
}
if
(
mon
.
clientfds_cnt
<=
0
)
{
if
(
mon
itor
.
clientfds_cnt
<=
0
)
{
NOTICE
(
"No remaining clients. lxc-monitord is exiting"
);
break
;
}
...
...
@@ -471,7 +471,7 @@ on_error:
lxc_monitord_cleanup
();
if
(
mainloop_opened
)
lxc_mainloop_close
(
&
mon
.
descr
);
lxc_mainloop_close
(
&
mon
itor
.
descr
);
exit
(
ret
);
}
Write
Preview
Markdown
is supported
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