From: Andrew Gerrand Date: Tue, 13 Jan 2015 05:33:55 +0000 (+1100) Subject: runtime: allow fake time writes to both stdout and stderr X-Git-Tag: go1.5beta1~2370 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=242050d07f1becd35d5990d7728403ea4eece5c3;p=gostls13.git runtime: allow fake time writes to both stdout and stderr In the previous sandbox implementation we read all sandboxed output from standard output, and so all fake time writes were made to standard output. Now we have a more sophisticated sandbox server (see golang.org/x/playground/sandbox) that is capable of recording both standard output and standard error, so allow fake time writes to go to either file descriptor. Change-Id: I79737deb06fd8e0f28910f21f41bd3dc1726781e Reviewed-on: https://go-review.googlesource.com/2713 Reviewed-by: Minux Ma --- diff --git a/src/runtime/sys_nacl_amd64p32.s b/src/runtime/sys_nacl_amd64p32.s index f5624ca8df..7657482fd1 100644 --- a/src/runtime/sys_nacl_amd64p32.s +++ b/src/runtime/sys_nacl_amd64p32.s @@ -94,13 +94,13 @@ playback: MOVL n+8(FP), DX BSWAPL DX MOVL DX, 12(SP) - MOVL $1, DI // standard output + MOVL fd+0(FP), DI MOVL SP, SI MOVL $16, DX NACL_SYSCALL(SYS_write) // Write actual data. - MOVL $1, DI // standard output + MOVL fd+0(FP), DI MOVL p+4(FP), SI MOVL n+8(FP), DX NACL_SYSCALL(SYS_write)