diff options
author | Micael Karlberg <[email protected]> | 2019-02-21 14:57:59 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2019-02-22 19:45:54 +0100 |
commit | 4ff181e69fc129576333c04a9d1d0c97b6770347 (patch) | |
tree | fe6b0e6ca67e64948d317c58734d0562563b4b2a /erts/emulator/nifs/common/socket_int.h | |
parent | b71c341212fa1ff07eac914e07bc57303c2c4385 (diff) | |
download | otp-4ff181e69fc129576333c04a9d1d0c97b6770347.tar.gz otp-4ff181e69fc129576333c04a9d1d0c97b6770347.tar.bz2 otp-4ff181e69fc129576333c04a9d1d0c97b6770347.zip |
[socket] More fixes to socket close
Better handling of socket close. The 'closeRef' needed
its own environment to make if work in both cases (both
called and scheduled).
Also Introduced the enif select wrapper functions (read,
write, stop and cancel). Also add error handling at every
time one of these functions are called.
OTP-14831
Diffstat (limited to 'erts/emulator/nifs/common/socket_int.h')
-rw-r--r-- | erts/emulator/nifs/common/socket_int.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/erts/emulator/nifs/common/socket_int.h b/erts/emulator/nifs/common/socket_int.h index 0f973855ae..a9e83adc21 100644 --- a/erts/emulator/nifs/common/socket_int.h +++ b/erts/emulator/nifs/common/socket_int.h @@ -258,6 +258,7 @@ extern ERL_NIF_TERM esock_atom_rxq_ovfl; extern ERL_NIF_TERM esock_atom_scope_id; extern ERL_NIF_TERM esock_atom_sctp; extern ERL_NIF_TERM esock_atom_sec; +extern ERL_NIF_TERM esock_atom_select_failed; extern ERL_NIF_TERM esock_atom_select_sent; extern ERL_NIF_TERM esock_atom_send; extern ERL_NIF_TERM esock_atom_sendmsg; @@ -349,10 +350,6 @@ extern ERL_NIF_TERM esock_atom_einval; #define MON_INIT(M) esock_monitor_init((M)) // #define MON_COMP(M1, M2) esock_monitor_compare((M1), (M2)) -#define SELECT(E,FD,M,O,P,R) \ - if (enif_select((E), (FD), (M), (O), (P), (R)) < 0) \ - return enif_make_badarg((E)); - #define COMPARE(A, B) enif_compare((A), (B)) #define IS_ATOM(E, TE) enif_is_atom((E), (TE)) |