From: Shenghou Ma Date: Sun, 3 May 2015 02:44:49 +0000 (-0400) Subject: syscall: fix little-endian assumptions X-Git-Tag: go1.5beta1~772 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=62bc2e4c2d9e289c1bdfd2415813d1776eb5c71b;p=gostls13.git syscall: fix little-endian assumptions Change-Id: Ia38256998e544d620a342dabedd9289d61fb0551 Reviewed-on: https://go-review.googlesource.com/9672 Reviewed-by: Dave Cheney Run-TryBot: Minux Ma TryBot-Result: Gobot Gobot --- diff --git a/src/syscall/exec_linux.go b/src/syscall/exec_linux.go index 02474fc459..ced2ca862d 100644 --- a/src/syscall/exec_linux.go +++ b/src/syscall/exec_linux.go @@ -178,14 +178,14 @@ func forkAndExecInChild(argv0 *byte, argv, envv []*byte, chroot, dir *byte, attr } if sys.Foreground { - pgrp := sys.Pgid + pgrp := int32(sys.Pgid) if pgrp == 0 { r1, _, err1 = RawSyscall(SYS_GETPID, 0, 0, 0) if err1 != 0 { goto childerror } - pgrp = int(r1) + pgrp = int32(r1) } // Place process group in foreground.