forked from golang/mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/mobileinit: redirect std{out,err} without using Go
As stderr may be written while the world is frozen (e.g. the runtime dumping the traceback of a panic), the redirection of stdout and stderr to Android's logcat cannot be done in Go but in C. This implementation spawns a detached thread which will wait for stdout or stderr to be readable, and when so, read one line at a time and write it to Android's logcat. Fixes golang/go#35590
- Loading branch information
Showing
1 changed file
with
198 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters