From 81abbc48e12317a07a8d2fcc041031c1c1567c8d Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Mon, 24 Feb 2014 09:43:11 +0100 Subject: 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. --- erts/emulator/drivers/unix/unix_efile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 */ -- cgit v1.2.3