-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sending message to a registered process via it's name does not work. #98
Comments
Update: this bug is still here (tested on 1939abf) |
still unresolved |
Changes `erlang:send/2' to accept a pid or registered process name. Fixes issue atomvm#98 Signed-off-by: Winford <winford@object.stream>
Changes `erlang:send/2' to accept a pid or registered process name. Fixes issue atomvm#98 Signed-off-by: Winford <winford@object.stream>
Changes `erlang:send/2' to accept a pid or registered process name. Fixes issue atomvm#98 Signed-off-by: Winford <winford@object.stream>
Changes `erlang:send/2' to accept a pid or registered process name. Fixes issue atomvm#98 Signed-off-by: Winford <winford@object.stream>
Changes `erlang:send/2' to accept a pid or registered process name. Updates `tests/erlang_tests/test_send_nif_and_echo.erl` to send directly to the registered name, and `tests/erlang_tests/test_send.erl` to test sending to an an unregistered `atom` name. Fixes issue atomvm#98 Signed-off-by: Winford <winford@object.stream>
Changes `erlang:send/2' to accept a pid or registered process name. Updates `tests/erlang_tests/test_send_nif_and_echo.erl` to also test sending directly to the registered name, and `tests/erlang_tests/test_send.erl` to test sending to an an unregistered `atom` name. Fixes issue atomvm#98 Signed-off-by: Winford <winford@object.stream>
Changes `erlang:send/2' to accept a pid or registered process name. Updates `tests/erlang_tests/test_send_nif_and_echo.erl` to also test sending directly to the registered name, and `tests/erlang_tests/test_send.erl` to test sending to an an unregistered `atom` name. Fixes issue atomvm#98 Signed-off-by: Winford <winford@object.stream>
Changes `erlang:send/2` to accept a pid or registered process name. Updates `tests/erlang_tests/test_send_nif_and_echo.erl` to also test sending directly to the registered name, and `tests/erlang_tests/test_send.erl` to test sending to an an unregistered `atom` name. Fixes issue atomvm#98 Signed-off-by: Winford <winford@object.stream>
Changes `erlang:send/2` to accept a pid or registered process name. Updates `tests/erlang_tests/test_send_nif_and_echo.erl` to also test sending directly to the registered name, and `tests/erlang_tests/test_send.erl` to test sending to an an unregistered `atom` name. Fixes issue atomvm#98 Signed-off-by: Winford <winford@object.stream>
Changes `erlang:send/2` to accept a pid or registered process name. Updates `tests/erlang_tests/test_send_nif_and_echo.erl` to also test sending directly to the registered name, and `tests/erlang_tests/test_send.erl` to test sending to an an unregistered `atom` name. Fixes issue atomvm#98 Signed-off-by: Winford <winford@object.stream>
Changes `erlang:send/2` to accept a pid or registered process name. Updates `tests/erlang_tests/test_send_nif_and_echo.erl` to also test sending directly to the registered name, and `tests/erlang_tests/test_send.erl` to test sending to an an unregistered `atom` name. Fixes issue atomvm#98 Signed-off-by: Winford <winford@object.stream>
Changes `erlang:send/2` to accept a pid or registered process name. Updates `tests/erlang_tests/test_send_nif_and_echo.erl` to also test sending directly to the registered name, and `tests/erlang_tests/test_send.erl` to test sending to an an unregistered `atom` name. Fixes issue atomvm#98 Signed-off-by: Winford <winford@object.stream>
Changes `erlang:send/2` to accept a pid or registered process name. Updates `tests/erlang_tests/test_send_nif_and_echo.erl` to also test sending directly to the registered name, and `tests/erlang_tests/test_send.erl` to test sending to an an unregistered `atom` name. Fixes issue atomvm#98 Signed-off-by: Winford <winford@object.stream>
Changes `erlang:send/2` to accept a pid or registered process name. Updates `tests/erlang_tests/test_send_nif_and_echo.erl` to also test sending directly to the registered name, and `tests/erlang_tests/test_send.erl` to test sending to an an unregistered `atom` name. Fixes issue atomvm#98 Signed-off-by: Winford <winford@object.stream>
Changes `erlang:send/2` to accept a pid or registered process name. Updates `tests/erlang_tests/test_send_nif_and_echo.erl` to also test sending directly to the registered name, and `tests/erlang_tests/test_send.erl` to test sending to an an unregistered `atom` name. Fixes issue atomvm#98 Signed-off-by: Winford <winford@object.stream>
Changes `erlang:send/2` to accept a pid or registered process name. Updates `tests/erlang_tests/test_send_nif_and_echo.erl` to also test sending directly to the registered name, and `tests/erlang_tests/test_send.erl` to test sending to an an unregistered `atom` name. Fixes issue atomvm#98 Signed-off-by: Winford <winford@object.stream>
Changes `erlang:send/2` to accept a pid or registered process name. Updates `tests/erlang_tests/test_send_nif_and_echo.erl` to also test sending directly to the registered name, and `tests/erlang_tests/test_send.erl` to test sending to an an unregistered `atom` name. Fixes issue atomvm#98 Signed-off-by: Winford <winford@object.stream>
Changes `erlang:send/2` to accept a pid or registered process name. Updates `tests/erlang_tests/test_send_nif_and_echo.erl` to also test sending directly to the registered name, and `tests/erlang_tests/test_send.erl` to test sending to an an unregistered `atom` name. Fixes issue atomvm#98 Signed-off-by: Winford <winford@object.stream>
Changes `erlang:send/2` to accept a pid or registered process name. Updates `tests/erlang_tests/test_send_nif_and_echo.erl` to also test sending directly to the registered name, and `tests/erlang_tests/test_send.erl` to test sending to an an unregistered `atom` name. Fixes issue atomvm#98 Signed-off-by: Winford <winford@object.stream>
Changes `erlang:send/2` to accept a pid or registered process name. Updates `tests/erlang_tests/test_send_nif_and_echo.erl` to also test sending directly to the registered name, and `tests/erlang_tests/test_send.erl` to test sending to an an unregistered `atom` name. Fixes issue atomvm#98 Signed-off-by: Winford <winford@object.stream>
Changes `erlang:send/2` to accept a pid or registered process name. Updates `tests/erlang_tests/test_send_nif_and_echo.erl` to also test sending directly to the registered name, and `tests/erlang_tests/test_send.erl` to test sending to an an unregistered `atom` name. Fixes issue atomvm#98 Signed-off-by: Winford <winford@object.stream>
Changes `erlang:send/2` to accept a pid or registered process name. Updates `tests/erlang_tests/test_send_nif_and_echo.erl` to also test sending directly to the registered name, and `tests/erlang_tests/test_send.erl` to test sending to an an unregistered `atom` name. Fixes issue atomvm#98 Signed-off-by: Winford <winford@object.stream>
Changes `erlang:send/2` to accept a pid or registered process name. Updates `tests/erlang_tests/test_send_nif_and_echo.erl` to also test sending directly to the registered name, and `tests/erlang_tests/test_send.erl` to test sending to an an unregistered `atom` name. Fixes issue atomvm#98 Signed-off-by: Winford <winford@object.stream>
Changes `erlang:send/2` to accept a pid or registered process name. Updates `tests/erlang_tests/test_send_nif_and_echo.erl` to also test sending directly to the registered name, and `tests/erlang_tests/test_send.erl` to test sending to an an unregistered `atom` name. Fixes issue atomvm#98 Signed-off-by: Winford <winford@object.stream>
Changes `erlang:send/2` to accept a pid or registered process name. Updates `tests/erlang_tests/test_send_nif_and_echo.erl` to also test sending directly to the registered name, and `tests/erlang_tests/test_send.erl` to test sending to an an unregistered `atom` name. Fixes issue atomvm#98 Signed-off-by: Winford <winford@object.stream>
This issue is still open, if you consider the send operator ( Here is a simpler example to reproduce the error:
On OTP:
On AtomVM:
I believe the issue may relate to the current implementation of the
As you can see, we are assuming the term in the 0th x-register is a Pid, when in fact it could be an atom. |
The oversight of missing OP_SEND opcode is finally addressed in #1047. |
Enables sending messages to registered processes using the shorhand `!` operator. If a message is sent to an atom name that is not registered using the `!` operator a `badarg` run-time error occurs, matching OTP behaviour. closes atomvm#1011 closes atomvm#98 Signed-off-by: Winford <winford@object.stream>
Enables sending messages to registered processes using the shorhand `!` operator. If a message is sent to an atom name that is not registered using the `!` operator a `badarg` run-time error occurs, matching OTP behaviour. closes atomvm#1011 closes atomvm#98 Signed-off-by: Winford <winford@object.stream>
Enables sending messages to registered processes using the shorhand `!` operator. If a message is sent to an atom name that is not registered using the `!` operator a `badarg` run-time error occurs, matching OTP behaviour. closes atomvm#1011 closes atomvm#98 Signed-off-by: Winford <winford@object.stream>
Enables sending messages to registered processes using the shorhand `!` operator. If a message is sent to an atom name that is not registered using the `!` operator a `badarg` run-time error occurs, matching OTP behaviour. closes atomvm#1011 closes atomvm#98 Signed-off-by: Winford <winford@object.stream>
Enables sending messages to registered processes using the shorhand `!` operator. If a message is sent to an atom name that is not registered using the `!` operator a `badarg` run-time error occurs, matching OTP behaviour. closes atomvm#1011 closes atomvm#98 Signed-off-by: Winford <winford@object.stream>
Enables sending messages to registered processes using the shorhand `!` operator. If a message is sent to an atom name that is not registered using the `!` operator a `badarg` run-time error occurs, matching OTP behaviour. closes atomvm#1011 closes atomvm#98 Signed-off-by: Winford <winford@object.stream>
Enables sending messages to registered processes using the shorhand `!` operator. If a message is sent to an atom name that is not registered using the `!` operator a `badarg` run-time error occurs, matching OTP behaviour. closes atomvm#1011 closes atomvm#98 Signed-off-by: Winford <winford@object.stream>
Allow sending messages to registered process with `!` Enables sending messages to registered processes using the shorthand `!` operator. If a message is sent to an atom name that is not registered using the `!` operator a `badarg` run-time error occurs, matching OTP behaviour. Closes #1011 Closes #98 These changes are made under both the "Apache 2.0" and the "GNU Lesser General Public License 2.1 or later" license terms (dual license). SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
running the pgm
-module(pr).
-export([start/0, ping/1, pong/0]).
ping(0) ->
pong ! finished,
erlang:display("ping finished");
ping(N) ->
erlang:display("ping started"),
pong ! {ping, self()},
erlang:display("ping sent"),
receive
pong ->
erlang:display("Ping received pong")
end,
ping(N - 1).
pong() ->
erlang:display("pong started"),
receive
finished ->
erlang:display("Pong finished");
{ping, Ping_PID} ->
erlang:display("Pong received ping"),
Ping_PID ! pong,
pong()
end.
start() ->
register(pong, spawn(pr, pong, [])),
spawn(pr, ping, [3]).
results in:
"pong started"
"ping started"
term is not a pid: a4b
"ping sent"
Hang detected
after replacing
pong ! Msg,
by
P = whereis(pong), P ! Msg,
the expected output
"pong started"
"ping started"
"ping sent"
"Pong received ping"
"pong started"
"Ping received pong"
"ping started"
"ping sent"
"Pong received ping"
"pong started"
"Ping received pong"
"ping started"
"ping sent"
"Pong received ping"
"pong started"
"Ping received pong"
"ping finished"
"Pong finished"
Return value: <0.3.0>
is displayed.
The text was updated successfully, but these errors were encountered: