]> Cypherpunks repositories - gostls13.git/commit
misc/android: don't let the Android exec wrapper hang indefinitely
authorElias Naur <elias.naur@gmail.com>
Mon, 1 May 2017 18:35:08 +0000 (20:35 +0200)
committerElias Naur <elias.naur@gmail.com>
Mon, 1 May 2017 22:31:15 +0000 (22:31 +0000)
commit00f827784b37babedcd7da53cdd5d657eb761dd3
tree67d7d2a1c7f98621ebd89033c72e1f65d15beab6
parentf9bec9eb424b1d857745393796f87f8698b20d53
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>
misc/android/go_android_exec.go