summaryrefslogtreecommitdiff
path: root/src/libstddjb/fd_send.c
blob: cdc3dd2d117106d77f64ed2627eeb2e5215e8cdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* ISC license. */

#include <sys/types.h>
#include <sys/socket.h>
#include <errno.h>
#include <skalibs/allreadwrite.h>

int fd_send (int fd, char const *buf, unsigned int len, unsigned int flags)
{
  register int r ;
  do r = send(fd, buf, len, (int)flags) ;
  while ((r == -1) && (errno == EINTR)) ;
  return r ;
}