[erlang-questions] Yaws's "sendfile" linked-in driver : "stealing control of fd" error
zabrane Mikael
zabrane3@REDACTED
Sun Apr 17 23:23:11 CEST 2011
Hi OTP team & Steve,
I'm using the "sendfile" (thanks to Steve Vinoski) linked-in driver
borrowed from "Yaws"
in one of my pet project.
Today, I noticed this strange error:
=ERROR REPORT==== 17-Apr-2011::20:49:18 ===
driver_select(0x0000000000000c31, 24, ERL_DRV_WRITE, 1) by
sendfile_drv driver #Port<0.3121> stealing control of fd=24 from
output driver tcp_inet #Port<0.10029>
Searching "stealing control of fd=" in the "otp_src_R14B02" source
code returns this:
otp_src_R14B02> find . -type "f" | xargs grep -n "stealing control of" | head -1
./erts/emulator/sys/common/erl_check_io.c:883:
The C function printing out this error line is:
static void
steal(erts_dsprintf_buf_t *dsbufp, ErtsDrvEventState *state, int mode)
{
erts_dsprintf(dsbufp, "stealing control of fd=%d from ", (int) state->fd);
switch (state->type) {
case ERTS_EV_TYPE_DRV_SEL: {
int deselect_mode = 0;
Eterm iid = state->driver.select->inport;
Eterm oid = state->driver.select->outport;
if ((mode & ERL_DRV_READ) && (is_not_nil(iid))) {
erts_dsprintf(dsbufp, "input driver ");
print_driver_name(dsbufp, iid);
erts_dsprintf(dsbufp, "%T ", iid);
deselect_mode |= ERL_DRV_READ;
}
Could someone please tell me what's the aim of this C function?
Should I consider this as an error or can I forget about it?
Regards,
Zab
More information about the erlang-questions
mailing list