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
281c3645
Unverified
Commit
281c3645
authored
Feb 02, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cgroups: rewind() file before polling again
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
97d7b200
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
cgfsng.c
src/lxc/cgroups/cgfsng.c
+2
-3
No files found.
src/lxc/cgroups/cgfsng.c
View file @
281c3645
...
@@ -2033,9 +2033,6 @@ static int freezer_cgroup_events_cb(int fd, uint32_t events, void *cbdata,
...
@@ -2033,9 +2033,6 @@ static int freezer_cgroup_events_cb(int fd, uint32_t events, void *cbdata,
size_t
len
;
size_t
len
;
const
char
*
state_string
;
const
char
*
state_string
;
if
(
lseek
(
fd
,
0
,
SEEK_SET
)
<
(
off_t
)
-
1
)
return
LXC_MAINLOOP_ERROR
;
f
=
fdopen_at
(
fd
,
""
,
"re"
,
PROTECT_OPEN
,
PROTECT_LOOKUP_BENEATH
);
f
=
fdopen_at
(
fd
,
""
,
"re"
,
PROTECT_OPEN
,
PROTECT_LOOKUP_BENEATH
);
if
(
!
f
)
if
(
!
f
)
return
LXC_MAINLOOP_ERROR
;
return
LXC_MAINLOOP_ERROR
;
...
@@ -2049,6 +2046,8 @@ static int freezer_cgroup_events_cb(int fd, uint32_t events, void *cbdata,
...
@@ -2049,6 +2046,8 @@ static int freezer_cgroup_events_cb(int fd, uint32_t events, void *cbdata,
if
(
strncmp
(
line
,
state_string
,
STRLITERALLEN
(
"frozen"
)
+
2
)
==
0
)
if
(
strncmp
(
line
,
state_string
,
STRLITERALLEN
(
"frozen"
)
+
2
)
==
0
)
return
LXC_MAINLOOP_CLOSE
;
return
LXC_MAINLOOP_CLOSE
;
rewind
(
f
);
return
LXC_MAINLOOP_CONTINUE
;
return
LXC_MAINLOOP_CONTINUE
;
}
}
...
...
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