From 62bc2e4c2d9e289c1bdfd2415813d1776eb5c71b Mon Sep 17 00:00:00 2001 From: Shenghou Ma Date: Sat, 2 May 2015 22:44:49 -0400 Subject: [PATCH] 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 --- src/syscall/exec_linux.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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. -- 2.48.1