diff options
author | Lukas Larsson <[email protected]> | 2014-02-24 09:43:11 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2014-02-24 15:24:08 +0100 |
commit | 81abbc48e12317a07a8d2fcc041031c1c1567c8d (patch) | |
tree | 5e1d9e0cfcca3e914e3032f71cfbd9e4a745645b /erts | |
parent | b0c0057661a634ac410d41d2e6cd8123c95acad5 (diff) | |
download | otp-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')
-rw-r--r-- | erts/emulator/drivers/unix/unix_efile.c | 3 |
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 */ |