s/qmail
4.1.17
Next generation secure email transport
sqmail-4.1.17
src
slurpclose.c
Go to the documentation of this file.
1
#include <unistd.h>
2
#include "stralloc.h"
3
#include "readclose.h"
4
#include "error.h"
5
6
int
readclose
(
int
fd
,stralloc *
sa
,
int
bufsize)
7
{
8
int
r;
9
for
(;;) {
10
if
(!stralloc_readyplus(
sa
,bufsize)) { close(
fd
);
return
-1; }
11
r = read(
fd
,
sa
->s +
sa
->len,bufsize);
12
if
(r == -1)
if
(errno == EINTR)
continue
;
13
if
(r <= 0) { close(
fd
);
return
r; }
14
sa
->len += r;
15
}
16
}
sa
stralloc sa
Definition:
dnscname.c:11
fd
int fd
Definition:
qmail-badloadertypes.c:30
readclose
int readclose(int fd, stralloc *sa, int bufsize)
Definition:
slurpclose.c:6
Generated on Fri Apr 22 2022 10:04:35 for s/qmail by
1.9.1