Skip to content
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

kernel: Update standard_error to use prim_tty nif #9116

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

garazdawi
Copy link
Contributor

The primary reason that we do this is to make writing to standard_error as synchronous as possible. When using the fd driver the write was done on an async thread, which meant that there was no simple way to get an acknowledgement when the write had completed. Now that we use a NIF we can much more easily get a check when the write is done so that we know when io:format(standard_error, ...) has returned we have also written to that fd.

@garazdawi garazdawi added team:VM Assigned to OTP team VM enhancement labels Nov 26, 2024
@garazdawi garazdawi added this to the OTP-28.0 milestone Nov 26, 2024
@garazdawi garazdawi self-assigned this Nov 26, 2024
Copy link
Contributor

github-actions bot commented Nov 26, 2024

CT Test Results

    4 files    200 suites   1h 51m 51s ⏱️
3 044 tests 2 755 ✅ 287 💤 2 ❌
4 009 runs  3 649 ✅ 358 💤 2 ❌

For more details on these failures, see this check.

Results for commit ba6446b.

♻️ This comment has been updated with latest results.

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

The primary reason that we do this is to make writing to standard_error
as synchronous as possible. When using the fd driver the write was
done on an async thread, which meant that there was no simple way
to get an acknowledgement when the write had completed. Now that we
use a NIF we can much more easily get a check when the write is done
so that we know when io:format(standard_error, ...) has returned we
have also written to that fd.
standard_error is started before the on_load handlers in init
are run, so prim_tty will not be completely loaded when running
in embedded mode. So we call it during init of prim_tty instead.
@garazdawi garazdawi force-pushed the lukas/kernel/blocking-stderr branch from dd4251d to ba6446b Compare November 27, 2024 09:05
@garazdawi garazdawi added the testing currently being tested, tag is used by OTP internal CI label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants