aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2012-03-15 12:30:52 +0100
committerLukas Larsson <[email protected]>2012-03-20 10:34:49 +0100
commit2676ca6135fbf78fcfce90b2c9a2f9c645756c54 (patch)
treefde6ef9425c4e6726980ed289758c069a9c7fa0a /erts/emulator
parent3618672c3e4746fada7464b2e31bf7c3ad0b3b88 (diff)
downloadotp-2676ca6135fbf78fcfce90b2c9a2f9c645756c54.tar.gz
otp-2676ca6135fbf78fcfce90b2c9a2f9c645756c54.tar.bz2
otp-2676ca6135fbf78fcfce90b2c9a2f9c645756c54.zip
Fix reselecting bug on OS X
Since stop_select is called at an arbitrary point in the future it would sometime not be alled before the tcp driver started selecting on the fd. So now ERL_DRV_USE_NO_CALLBACK is used so that the stop_select call is never made. This seems to only have happened OS X.
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/drivers/common/efile_drv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/drivers/common/efile_drv.c b/erts/emulator/drivers/common/efile_drv.c
index ad0e371950..a251b064da 100644
--- a/erts/emulator/drivers/common/efile_drv.c
+++ b/erts/emulator/drivers/common/efile_drv.c
@@ -1800,7 +1800,7 @@ static void free_sendfile(void *data) {
MUTEX_LOCK(d->c.sendfile.q_mtx);
driver_deq(d->c.sendfile.port,1);
MUTEX_UNLOCK(d->c.sendfile.q_mtx);
- driver_select(d->c.sendfile.port, (ErlDrvEvent)(long)d->c.sendfile.out_fd, ERL_DRV_USE|ERL_DRV_WRITE, 0);
+ driver_select(d->c.sendfile.port, (ErlDrvEvent)(long)d->c.sendfile.out_fd, ERL_DRV_USE_NO_CALLBACK|ERL_DRV_WRITE, 0);
}
EF_FREE(data);
}
@@ -2272,7 +2272,7 @@ file_async_ready(ErlDrvData e, ErlDrvThreadData data)
desc->sendfile_state = sending;
desc->d = d;
driver_select(desc->port, (ErlDrvEvent)(long)d->c.sendfile.out_fd,
- ERL_DRV_USE|ERL_DRV_WRITE, 1);
+ ERL_DRV_USE_NO_CALLBACK|ERL_DRV_WRITE, 1);
}
break;
#endif