-
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
No way to unregister a process. #358
Comments
UncleGrumpy
pushed a commit
to UncleGrumpy/AtomVM
that referenced
this issue
Oct 12, 2022
Closes issue atomvm#358. Signed-off-by: Winford <dwinford@pm.me>
UncleGrumpy
pushed a commit
to UncleGrumpy/AtomVM
that referenced
this issue
Oct 12, 2022
Closes issue atomvm#358. Signed-off-by: Winford <dwinford@pm.me>
UncleGrumpy
pushed a commit
to UncleGrumpy/AtomVM
that referenced
this issue
Oct 22, 2022
Closes issue atomvm#358. Signed-off-by: Winford <dwinford@pm.me>
UncleGrumpy
pushed a commit
to UncleGrumpy/AtomVM
that referenced
this issue
Oct 22, 2022
Closes issue atomvm#358. Signed-off-by: Winford <dwinford@pm.me>
UncleGrumpy
pushed a commit
to UncleGrumpy/AtomVM
that referenced
this issue
Oct 22, 2022
Closes issue atomvm#358. Signed-off-by: Winford <dwinford@pm.me>
UncleGrumpy
pushed a commit
to UncleGrumpy/AtomVM
that referenced
this issue
Oct 22, 2022
Closes issue atomvm#358. Signed-off-by: Winford <dwinford@pm.me>
UncleGrumpy
pushed a commit
to UncleGrumpy/AtomVM
that referenced
this issue
Oct 22, 2022
Closes issue atomvm#358. Signed-off-by: Winford <dwinford@pm.me>
UncleGrumpy
pushed a commit
to UncleGrumpy/AtomVM
that referenced
this issue
Oct 22, 2022
Closes issue atomvm#358. Signed-off-by: Winford <dwinford@pm.me>
UncleGrumpy
pushed a commit
to UncleGrumpy/AtomVM
that referenced
this issue
Oct 22, 2022
Closes issue atomvm#358. Signed-off-by: Winford <dwinford@pm.me>
UncleGrumpy
pushed a commit
to UncleGrumpy/AtomVM
that referenced
this issue
Oct 22, 2022
Closes issue atomvm#358. Signed-off-by: Winford <dwinford@pm.me>
bettio
pushed a commit
that referenced
this issue
Oct 23, 2022
Closes issue #358. Signed-off-by: Winford <dwinford@pm.me>
bettio
added a commit
that referenced
this issue
Oct 23, 2022
Add support for `unregister/1` These changes add `unregister/1` as well as some minor enhancements to error returns to match expected otp behavior, and address the TODOs in the `nif_erlang_register_2` function in src/libAtomVM.nifs.c. Also adds test for `register/2` and `unregister/1` return values, functionality, and error returns - designed to test the conditions raised in the previously addressed TODOs (existing process pid, not already registered, not the atom "undefined"). Closes issue #358 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
The merge of PR #364 closes this issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is currently no way to unregister a process, and more importantly no way to do it internally at the C layer. If a process is stopped or dies it will remain registered and cannot be registered again with the same name. Possibly worse that that if a later process is assigned that pid messages sent by use of whereis(process) will be sending the messages to a process that was never intended to receive them.
This also is a problem in the case of the gpio_driver for esp32. If the driver is stopped (Issue #277) it cannot be restarted properly, because whereis(gpio) will still return a pid, even if the process is not running anymore.
The text was updated successfully, but these errors were encountered: