1
0
mirror of https://github.com/golang/go synced 2024-09-23 17:20:13 -06:00
go/misc/android
Elias Naur 00f827784b misc/android: don't let the Android exec wrapper hang indefinitely
On Android, the exec wrapper passes on output from adb to its parent
process by passing on os.Stderr and os.Stdout to adb. If the adb
process somehow hangs, it will keep stderr and stdout will open, in turn
blocking go test from ever returning from its cmd.Wait() even though
it has killed the exec wrapper process.

Break the short circuit by introducing a wrapper between adb and the
exec wrapper, preventing os/exec.Run from passing along the raw
file descriptors for os.Stdout and os.Stderr.

(Hopefully) fixes occasional indefinite hangs on the Android builder.

Change-Id: I1188211fbde79b4a66bf93ff8e9d0091abf34560
Reviewed-on: https://go-review.googlesource.com/42271
Run-TryBot: Elias Naur <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-05-01 22:31:15 +00:00
..
cleaner.go misc/android: cleaner to remove stale GOROOT files 2015-05-25 20:52:10 +00:00
go_android_exec.go misc/android: don't let the Android exec wrapper hang indefinitely 2017-05-01 22:31:15 +00:00
README

Android
=======

For details on developing Go for Android, see the documentation in the
mobile subrepository:

	https://github.com/golang/mobile

To run the standard library tests, see androidtest.bash. Run it as

	CC_FOR_TARGET=.../ndk-gcc GOARCH=arm GOARM=7 ./androidtest.bash