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
d2bd14f0
Unverified
Commit
d2bd14f0
authored
Jul 29, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: s/read()/lxc_read_nointr()/g
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
41b1a847
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
lxc_monitord.c
src/lxc/lxc_monitord.c
+2
-2
lxc_usernsexec.c
src/lxc/tools/lxc_usernsexec.c
+2
-2
No files found.
src/lxc/lxc_monitord.c
View file @
d2bd14f0
...
@@ -158,7 +158,7 @@ static int lxc_monitord_sock_handler(int fd, uint32_t events, void *data,
...
@@ -158,7 +158,7 @@ static int lxc_monitord_sock_handler(int fd, uint32_t events, void *data,
int
rc
;
int
rc
;
char
buf
[
4
];
char
buf
[
4
];
rc
=
read
(
fd
,
buf
,
sizeof
(
buf
));
rc
=
lxc_read_nointr
(
fd
,
buf
,
sizeof
(
buf
));
if
(
rc
>
0
&&
!
strncmp
(
buf
,
"quit"
,
4
))
if
(
rc
>
0
&&
!
strncmp
(
buf
,
"quit"
,
4
))
quit
=
1
;
quit
=
1
;
}
}
...
@@ -297,7 +297,7 @@ static int lxc_monitord_fifo_handler(int fd, uint32_t events, void *data,
...
@@ -297,7 +297,7 @@ static int lxc_monitord_fifo_handler(int fd, uint32_t events, void *data,
struct
lxc_msg
msglxc
;
struct
lxc_msg
msglxc
;
struct
lxc_monitor
*
mon
=
data
;
struct
lxc_monitor
*
mon
=
data
;
ret
=
read
(
fd
,
&
msglxc
,
sizeof
(
msglxc
));
ret
=
lxc_read_nointr
(
fd
,
&
msglxc
,
sizeof
(
msglxc
));
if
(
ret
!=
sizeof
(
msglxc
))
{
if
(
ret
!=
sizeof
(
msglxc
))
{
SYSERROR
(
"Reading from fifo failed: %s."
,
strerror
(
errno
));
SYSERROR
(
"Reading from fifo failed: %s."
,
strerror
(
errno
));
return
1
;
return
1
;
...
...
src/lxc/tools/lxc_usernsexec.c
View file @
d2bd14f0
...
@@ -383,7 +383,7 @@ int main(int argc, char *argv[])
...
@@ -383,7 +383,7 @@ int main(int argc, char *argv[])
perror
(
"write pipe"
);
perror
(
"write pipe"
);
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
}
}
if
(
read
(
pipe_fds2
[
0
],
buf
,
1
)
<
1
)
{
if
(
lxc_read_nointr
(
pipe_fds2
[
0
],
buf
,
1
)
<
1
)
{
perror
(
"read pipe"
);
perror
(
"read pipe"
);
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
}
}
...
@@ -399,7 +399,7 @@ int main(int argc, char *argv[])
...
@@ -399,7 +399,7 @@ int main(int argc, char *argv[])
close
(
pipe_fds1
[
1
]);
close
(
pipe_fds1
[
1
]);
close
(
pipe_fds2
[
0
]);
close
(
pipe_fds2
[
0
]);
if
(
read
(
pipe_fds1
[
0
],
buf
,
1
)
<
1
)
{
if
(
lxc_read_nointr
(
pipe_fds1
[
0
],
buf
,
1
)
<
1
)
{
perror
(
"read pipe"
);
perror
(
"read pipe"
);
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
}
}
...
...
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