[erlang-questions] inet:getstat on non-socket crashes the VM?
Bekes, Andras G
Fri Jun 22 13:53:37 CEST 2018
I noticed that calling inet:getstat/1 is a dangerous operation, as it can kill the whole VM if used inappropriately.
It is easy to reproduce:
Eshell V9.3 (abort with ^G)
2> [inet:getstat(X) || X<-erlang:ports()].
Failed to write to erl_child_setup: 9
Crash dump is being written to: erl_crash.dump...done
Without sasl, it doesn't kill the VM, but the terminal gets into a faulty state and further work is not possible.
I know calling it on a non-socket is an erroneous action, but crashing the VM doesn't seem to be the most appropriate consequence.
What do you think?
Andras G. Bekes
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions