Re: Did rpc:call change behaviour in OTP-23.x or 24.x?
Rickard Green <[email protected]>
| Newsgroups | gmane.comp.lang.erlang.general |
|---|---|
| Message-ID | <CAA_Z33MBXYjfddSOF-E9NMAXyhXwo_Nwqhctjztc8_CPXnjKUg@mail.gmail.com> |
On Fri, Oct 8, 2021 at 7:10 PM Roger Lipscombe <[email protected]> wrote: > Specifically, I invoke the below function with rpc:call from an escript... > > frob(Parent, Etc) -> > link(Parent) > % do something interesting > ok. > > (condensed example) > > My escript dies with the following: > > {"init terminating in > do_boot",{#Ref<0.2297215750.597688321.118580>,return,ok}} > init terminating in do_boot ({,return,ok}) > > If I unlink from the pid before returning, it's all good. This has > worked perfectly since (afaict) R16, but broke at some point between > OTP-22.x and OTP-24.x (we skipped OTP-23.x) > > We're using OTP-24.0.6 > Yes this was intentionally changed in OTP 23 due to a performance optimization. The process executing the actual call now terminates with an exit reason not equal to normal while it previously used to terminate with a normal exit reason. The rpc module has however never given any guarantees about what happens with the process executing the call after the call returns. Leaving a link to the process after the call is erroneous. Regards, Rickard -- Rickard Green, Erlang/OTP, Ericsson AB