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
28143f88
Unverified
Commit
28143f88
authored
Sep 03, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
file_utils: add lxc_send_nointr()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
e3233f26
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
file_utils.c
src/lxc/file_utils.c
+11
-0
file_utils.h
src/lxc/file_utils.h
+1
-0
No files found.
src/lxc/file_utils.c
View file @
28143f88
...
...
@@ -106,6 +106,17 @@ again:
return
ret
;
}
ssize_t
lxc_send_nointr
(
int
sockfd
,
void
*
buf
,
size_t
len
,
int
flags
)
{
ssize_t
ret
;
again:
ret
=
send
(
sockfd
,
buf
,
len
,
flags
);
if
(
ret
<
0
&&
errno
==
EINTR
)
goto
again
;
return
ret
;
}
ssize_t
lxc_read_nointr
(
int
fd
,
void
*
buf
,
size_t
count
)
{
ssize_t
ret
;
...
...
src/lxc/file_utils.h
View file @
28143f88
...
...
@@ -37,6 +37,7 @@ extern int lxc_read_from_file(const char *filename, void *buf, size_t count);
/* send and receive buffers completely */
extern
ssize_t
lxc_write_nointr
(
int
fd
,
const
void
*
buf
,
size_t
count
);
extern
ssize_t
lxc_send_nointr
(
int
sockfd
,
void
*
buf
,
size_t
len
,
int
flags
);
extern
ssize_t
lxc_read_nointr
(
int
fd
,
void
*
buf
,
size_t
count
);
extern
ssize_t
lxc_read_nointr_expect
(
int
fd
,
void
*
buf
,
size_t
count
,
const
void
*
expected_buf
);
...
...
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