emscripten-core / emscripten-core/emscripten

[question] How to get FILE* stdout / stderr from JavaScript?

Open
#14,457 17 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

I mapped `_fopen` , but it returns NULL:
```
> fopen('/dev/stderr', 'w')
0
> fopen('/dev/stdout', 'w')
0
```

Also, mapping `_fputc` produces `Uncaught RuntimeError: function signature mismatch`

Does anybody have an example of writing a `\n` to `stderr` from JavaScript?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.