erlang:hibernate/0
--> erlang:process_info(Pid, current_function)
returns incorrect results
#9509
Labels
not a bug
Issue is determined as not a bug by OTP
Describe the bug
If a function in a compiled module calls the new
erlang:hibernate/0
, a call toerlang:process_info(Pid, current_function)
returns the calling module/function instead of{erlang, hibernate, 0}
.If a function in a compiled module spawns a process with an anonymous function which calls
erlang:hibernate/0
,erlang:process_info(Pid, current_function)
returns the module and the internal name of the anonymous function instead of{erlang, hibernate, 0}
.However, when doing the same spawn in the shell,
erlang:process_info(Pid, current_function)
correctly returns{erlang, hibernate, 0}
.If a spawn is made via the MFA form, ie
Pid=spawn(erlang, hibernate, [])
,erlang:process_info(Pid, current_function)
correctly returns{erlang, hibernate, 0}
both if the spawn was made from a function in a compiled module or in the shell.To Reproduce
In the shell:
Expected behavior
erlang:process_info(Pid, current_function)
always returns{erlang, hibernate, 0}
for all above cases.Affected versions
OTP 28
The text was updated successfully, but these errors were encountered: