aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2015-05-08 19:06:02 +0200
committerSverker Eriksson <[email protected]>2015-05-08 19:06:02 +0200
commitb6b4fd292a7f63ce9f28c0248b0d8e646971c926 (patch)
treeb4b0d28cf0d5c05c43bb851d1f94dc0419124a59 /erts/emulator
parent0a3dbbc20377aba3d7732ab6d2dca21e0f7b37c0 (diff)
parentdaaefc2fa63eb0c3fc8f6183ec1169733c2f2ea8 (diff)
downloadotp-b6b4fd292a7f63ce9f28c0248b0d8e646971c926.tar.gz
otp-b6b4fd292a7f63ce9f28c0248b0d8e646971c926.tar.bz2
otp-b6b4fd292a7f63ce9f28c0248b0d8e646971c926.zip
Merge branch 'sg2342/fix_freebsd_sendfile/OTP-12720'
* sg2342/fix_freebsd_sendfile/OTP-12720: Fix FreeBSD sendfile
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/drivers/common/efile_drv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/erts/emulator/drivers/common/efile_drv.c b/erts/emulator/drivers/common/efile_drv.c
index 518646649d..b2cfe70f94 100644
--- a/erts/emulator/drivers/common/efile_drv.c
+++ b/erts/emulator/drivers/common/efile_drv.c
@@ -1938,6 +1938,8 @@ static void invoke_sendfile(void *data)
d->result_ok = 1;
if (d->c.sendfile.nbytes != 0)
d->c.sendfile.nbytes -= nbytes;
+ } else if (nbytes == 0 && d->c.sendfile.nbytes == 0) {
+ d->result_ok = 1;
} else
d->result_ok = 0;
} else {