mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-08 00:16:13 +00:00
file_utils: add lxc_recv_nointr()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
a8007512f7
commit
de69edd15e
@ -117,6 +117,17 @@ again:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ssize_t lxc_recv_nointr(int sockfd, void *buf, size_t len, int flags)
|
||||||
|
{
|
||||||
|
ssize_t ret;
|
||||||
|
again:
|
||||||
|
ret = recv(sockfd, buf, len, flags);
|
||||||
|
if (ret < 0 && errno == EINTR)
|
||||||
|
goto again;
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
ssize_t lxc_read_nointr_expect(int fd, void *buf, size_t count, const void *expected_buf)
|
ssize_t lxc_read_nointr_expect(int fd, void *buf, size_t count, const void *expected_buf)
|
||||||
{
|
{
|
||||||
ssize_t ret;
|
ssize_t ret;
|
||||||
|
@ -40,6 +40,8 @@ extern ssize_t lxc_write_nointr(int fd, const void *buf, size_t count);
|
|||||||
extern ssize_t lxc_read_nointr(int fd, void *buf, size_t count);
|
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,
|
extern ssize_t lxc_read_nointr_expect(int fd, void *buf, size_t count,
|
||||||
const void *expected_buf);
|
const void *expected_buf);
|
||||||
|
extern ssize_t lxc_recv_nointr(int sockfd, void *buf, size_t len, int flags);
|
||||||
|
|
||||||
extern bool file_exists(const char *f);
|
extern bool file_exists(const char *f);
|
||||||
extern int print_to_file(const char *file, const char *content);
|
extern int print_to_file(const char *file, const char *content);
|
||||||
extern int is_dir(const char *path);
|
extern int is_dir(const char *path);
|
||||||
|
Loading…
Reference in New Issue
Block a user