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

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

ssize_t fd_write (int fd, char const *buf, size_t len)
{
  register ssize_t r ;
  do r = write(fd, buf, len) ;
  while ((r == -1) && (errno == EINTR)) ;
  return r ;
}