summaryrefslogtreecommitdiffstats
path: root/source3/lib/system.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-12-21 23:22:30 +0100
committerVolker Lendecke <vl@samba.org>2008-12-29 13:24:27 +0100
commit6251b97e02c890b184e13187020c19c8c2e82f2c (patch)
tree6b7551704deed201a8498fc8ea62a01964d2bfd0 /source3/lib/system.c
parent102028ec722d942d7f91eb92e8da4f1480d140d1 (diff)
downloadsamba-6251b97e02c890b184e13187020c19c8c2e82f2c.tar.gz
samba-6251b97e02c890b184e13187020c19c8c2e82f2c.tar.xz
samba-6251b97e02c890b184e13187020c19c8c2e82f2c.zip
Add sys_writev
Diffstat (limited to 'source3/lib/system.c')
-rw-r--r--source3/lib/system.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 86c4ef2097f..d52d12bf721 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -142,6 +142,20 @@ ssize_t sys_write(int fd, const void *buf, size_t count)
}
/*******************************************************************
+A writev wrapper that will deal with EINTR.
+********************************************************************/
+
+ssize_t sys_writev(int fd, const struct iovec *iov, int iovcnt)
+{
+ ssize_t ret;
+
+ do {
+ ret = writev(fd, iov, iovcnt);
+ } while (ret == -1 && errno == EINTR);
+ return ret;
+}
+
+/*******************************************************************
A pread wrapper that will deal with EINTR and 64-bit file offsets.
********************************************************************/