aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2014-02-24 09:43:11 +0100
committerLukas Larsson <[email protected]>2014-02-24 15:24:08 +0100
commit81abbc48e12317a07a8d2fcc041031c1c1567c8d (patch)
tree5e1d9e0cfcca3e914e3032f71cfbd9e4a745645b /erts/emulator
parentb0c0057661a634ac410d41d2e6cd8123c95acad5 (diff)
downloadotp-81abbc48e12317a07a8d2fcc041031c1c1567c8d.tar.gz
otp-81abbc48e12317a07a8d2fcc041031c1c1567c8d.tar.bz2
otp-81abbc48e12317a07a8d2fcc041031c1c1567c8d.zip
erts: Fix unix efile assert
If writev return an error (eg ENOSPC) we do not want to abort here but instead propagate upwards into erlang.
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/drivers/unix/unix_efile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/emulator/drivers/unix/unix_efile.c b/erts/emulator/drivers/unix/unix_efile.c
index 06078858ca..42f41c5f3d 100644
--- a/erts/emulator/drivers/unix/unix_efile.c
+++ b/erts/emulator/drivers/unix/unix_efile.c
@@ -634,7 +634,8 @@ efile_writev(Efile_error* errInfo, /* Where to return error codes */
do {
w = write(fd, iov[cnt].iov_base, iov[cnt].iov_len);
} while (w < 0 && errno == EINTR);
- ASSERT(w <= iov[cnt].iov_len);
+ ASSERT(w <= iov[cnt].iov_len ||
+ (w == -1 && errno != EINTR));
}
if (w < 0) return check_error(-1, errInfo);
/* Move forward to next buffer to write */