spawn to rpc, filter, etc.
bile@REDACTED
bile@REDACTED
Sun Feb 21 11:13:03 CET 2010
git fetch git://github.com/bile/otp.git spawn_rpc
git fetch git://github.com/bile/otp.git net_kernel_catchall
git fetch git://github.com/bile/otp.git kernel_stops
- spawn_rpc
It moves net_kernel:spawn into the rpc module to normalize remote
'apply'ing somewhat. erlang:spawn/4 sends messages to rex. net_kernel's
spawn now calls rex's allowing older code to call newer but not reverse.
Additionally a function which can be used to filter incoming rpc/spawn
calls. fun(M,F,A,From) -> bool(). Set by calling rpc:filter(fun()). On
returning true it allows the call otherwise it error(undef)'s as would
an actually undefined MFA.
It'd be useful in partially sandboxing connected nodes. I'm thinking
it'd be nice to offer a default filter which white listed all expected
calls made by appmon and other such apps so nonstandard calls would
fail but the system would function otherwise.
- net_kernel_catchall
Adds handle_call(_,_,State) to net_kernel so it doesn't exit when
receiving a random gen_server message. Just doesn't reply like rex.
- kernel_stops
Since rex and other non-'minimal' apps are configured to be permanent
under kernel_sup it causes it to exit given it's 0 restart attempts
should rpc:stop() be called. Changed rex, global_group, global and inet_db
to be transient and return the same value when Mod:stop()ed.
More information about the erlang-patches
mailing list