erlware / relx

Sane, simple release creation for Erlang
http://erlware.github.io/relx
Apache License 2.0
697 stars 232 forks source link

"rpc" always using erl_call on OTP-23, leads to I/O group leader regression #824

Closed arekinath closed 3 years ago

arekinath commented 4 years ago

It seems like in the latest release, with OTP-23, using the new "rpc" command on the extended start script leads to executing the specified function without the I/O group leader being set appropriately. This means that if the function you're calling uses e.g. io:format(), that output will now go into a log file or onto the node's console rather than into the output of the "rpc" command.

E.g.:

$ ./rel/bin/thing rpc io format '["test\n"]'
ok

(the "test" string is printed into the erlang console logs of the node instead)

This is not the case with nodetool -- if I edit the start script to stop using erl_call and use nodetool instead, this works fine and I get the "test" string in the output of the "rpc" command.

Since the new extended start script now unconditionally uses erl_call no matter what on OTP-23 and later, there is no longer any way to make an RPC call with the start script. This is a pretty big regression over previous releases.

tsloughter commented 4 years ago

Well crap... I really want to remove nodetool which is why erl_call was moved to in OTP-23 where it has some changes that were needed.

Hopefully there is a way to fix this that doesn't involve keeping nodetool.