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
e3233f26
Unverified
Commit
e3233f26
authored
Sep 03, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tree-wide: s/recv()/lxc_recv_nointr()/g
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
a285b308
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
11 deletions
+7
-11
commands.c
src/lxc/commands.c
+1
-1
commands_utils.c
src/lxc/commands_utils.c
+2
-7
network.c
src/lxc/network.c
+4
-3
No files found.
src/lxc/commands.c
View file @
e3233f26
...
...
@@ -1166,7 +1166,7 @@ static int lxc_cmd_handler(int fd, uint32_t events, void *data,
goto
out_close
;
}
ret
=
recv
(
fd
,
reqdata
,
req
.
datalen
,
0
);
ret
=
lxc_recv_nointr
(
fd
,
reqdata
,
req
.
datalen
,
0
);
if
(
ret
!=
req
.
datalen
)
{
WARN
(
"Failed to receive full command request. Ignoring "
"request for
\"
%s
\"
"
,
lxc_cmd_str
(
req
.
cmd
));
...
...
src/lxc/commands_utils.c
View file @
e3233f26
...
...
@@ -32,6 +32,7 @@
#include "commands.h"
#include "commands_utils.h"
#include "initutils.h"
#include "file_utils.h"
#include "log.h"
#include "lxclock.h"
#include "monitor.h"
...
...
@@ -61,14 +62,8 @@ int lxc_cmd_sock_rcv_state(int state_client_fd, int timeout)
memset
(
&
msg
,
0
,
sizeof
(
msg
));
again:
ret
=
recv
(
state_client_fd
,
&
msg
,
sizeof
(
msg
),
0
);
ret
=
lxc_recv_nointr
(
state_client_fd
,
&
msg
,
sizeof
(
msg
),
0
);
if
(
ret
<
0
)
{
if
(
errno
==
EINTR
)
{
TRACE
(
"Caught EINTR; retrying"
);
goto
again
;
}
SYSERROR
(
"Failed to receive message"
);
return
-
1
;
}
...
...
src/lxc/network.c
View file @
e3233f26
...
...
@@ -48,6 +48,7 @@
#include "af_unix.h"
#include "conf.h"
#include "config.h"
#include "file_utils.h"
#include "log.h"
#include "macro.h"
#include "network.h"
...
...
@@ -3081,7 +3082,7 @@ int lxc_network_recv_veth_names_from_parent(struct lxc_handler *handler)
if
(
netdev
->
type
!=
LXC_NET_VETH
)
continue
;
ret
=
recv
(
data_sock
,
netdev
->
name
,
IFNAMSIZ
,
0
);
ret
=
lxc_recv_nointr
(
data_sock
,
netdev
->
name
,
IFNAMSIZ
,
0
);
if
(
ret
<
0
)
return
-
1
;
TRACE
(
"Received network device name
\"
%s
\"
from parent"
,
netdev
->
name
);
...
...
@@ -3136,14 +3137,14 @@ int lxc_network_recv_name_and_ifindex_from_child(struct lxc_handler *handler)
/* Receive network device name in the child's namespace to
* parent.
*/
ret
=
recv
(
data_sock
,
netdev
->
name
,
IFNAMSIZ
,
0
);
ret
=
lxc_recv_nointr
(
data_sock
,
netdev
->
name
,
IFNAMSIZ
,
0
);
if
(
ret
<
0
)
return
-
1
;
/* Receive network device ifindex in the child's namespace to
* parent.
*/
ret
=
recv
(
data_sock
,
&
netdev
->
ifindex
,
sizeof
(
netdev
->
ifindex
),
0
);
ret
=
lxc_recv_nointr
(
data_sock
,
&
netdev
->
ifindex
,
sizeof
(
netdev
->
ifindex
),
0
);
if
(
ret
<
0
)
return
-
1
;
}
...
...
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