Skip to content

Deprecate erlang:exit/2 and erlang:exit/3#10914

Open
richcarl wants to merge 3 commits intoerlang:masterfrom
richcarl:exit-signal-pt2
Open

Deprecate erlang:exit/2 and erlang:exit/3#10914
richcarl wants to merge 3 commits intoerlang:masterfrom
richcarl:exit-signal-pt2

Conversation

@richcarl
Copy link
Copy Markdown
Contributor

This is a followup based on #10801 and intended for OTP 30.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 24, 2026

CT Test Results

No tests were run for this PR. This is either because the build failed, or the PR is based on a branch without GH actions tests configured.

Results for commit e28dea9

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@IngelaAndin IngelaAndin added the team:VM Assigned to OTP team VM label Mar 25, 2026
@bjorng bjorng added this to the 30.0 milestone Mar 26, 2026
@bjorng bjorng added stalled waiting for input by the Erlang/OTP team and removed stalled waiting for input by the Erlang/OTP team labels Mar 26, 2026
Comment thread system/doc/reference_manual/ref_man_processes.md Outdated
@mikpe
Copy link
Copy Markdown
Contributor

mikpe commented Apr 19, 2026

Why? What problem does this solve?

@richcarl
Copy link
Copy Markdown
Contributor Author

Why? What problem does this solve?

Apart from the small detail that exit/2 ignores signals sent by a process to itself (probably rare that this happens, but if it does, it could be quite confusing), the main thing is that exit/1 and exit/2 do very different things, one on the exception level and the other on the signal level. When reading code, it's very easy to miss that what you thought was a simple exit/1 was in fact an exit/2 or vice versa - in particular if they occur in the same module. (I've seen cases with exactly one exit/2 among a bunch of exit/1.)

So I think there is a point, for maintainability, to have a warning that steers people towards using exit_signal/2 instead. Especially if documentation and training material moves on to using the new name, calls to exit/2 will become even more obscure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team:VM Assigned to OTP team VM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants