Skip to content

Commit cf13769

Browse files
committed
Merge branch 'frazze/kernel/standard_error_register_race_condition/OTP-19832' into maint
* frazze/kernel/standard_error_register_race_condition/OTP-19832: Fix race condition in standard_error process registration
2 parents c247270 + 6b6f7f9 commit cf13769

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/kernel/src/standard_error.erl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,11 @@ init([]) ->
6262
end.
6363

6464
start() ->
65-
Id = spawn(fun server/0),
66-
register(?NAME, Id),
67-
Id.
65+
spawn(fun server/0).
6866

6967
server() ->
7068
process_flag(trap_exit, true),
69+
register(?NAME, self()),
7170
ok = prim_tty:load(),
7271
TTY = prim_tty:init(#{ input => disabled,
7372
output => cooked,

0 commit comments

Comments
 (0)