aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_driver.h
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2015-01-12 17:30:45 +0100
committerBjörn-Egil Dahlberg <[email protected]>2015-01-13 16:59:10 +0100
commitd373dc49ae4c8a2d27dde23564bcaf2642cc46e5 (patch)
tree4c55a853ab223e731eab6e3603788e6d3bd56afb /erts/emulator/beam/erl_driver.h
parentaf87b1c3d4897840d8247589a88d3611106ecedc (diff)
downloadotp-d373dc49ae4c8a2d27dde23564bcaf2642cc46e5.tar.gz
otp-d373dc49ae4c8a2d27dde23564bcaf2642cc46e5.tar.bz2
otp-d373dc49ae4c8a2d27dde23564bcaf2642cc46e5.zip
erts: Extend driver interface with emergency_close
The intention of this callback is to close all sockets associated to a port. It is closed only on crashdumps. This will currently only be used for the epmd port.
Diffstat (limited to 'erts/emulator/beam/erl_driver.h')
-rw-r--r--erts/emulator/beam/erl_driver.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_driver.h b/erts/emulator/beam/erl_driver.h
index f9938fc66c..e498ac70ec 100644
--- a/erts/emulator/beam/erl_driver.h
+++ b/erts/emulator/beam/erl_driver.h
@@ -133,7 +133,7 @@ typedef struct {
#define ERL_DRV_EXTENDED_MARKER (0xfeeeeeed)
#define ERL_DRV_EXTENDED_MAJOR_VERSION 3
-#define ERL_DRV_EXTENDED_MINOR_VERSION 1
+#define ERL_DRV_EXTENDED_MINOR_VERSION 2
/*
* The emulator will refuse to load a driver with a major version
@@ -361,6 +361,9 @@ typedef struct erl_drv_entry {
/* Called on behalf of driver_select when
it is safe to release 'event'. A typical
unix driver would call close(event) */
+ void (*emergency_close)(ErlDrvData drv_data);
+ /* called when the port is closed abruptly.
+ specifically when erl_crash_dump is called. */
/* When adding entries here, dont forget to pad in obsolete/driver.h */
} ErlDrvEntry;