Commit 62bc2e4c authored by Shenghou Ma's avatar Shenghou Ma Committed by Minux Ma

syscall: fix little-endian assumptions

Change-Id: Ia38256998e544d620a342dabedd9289d61fb0551
Reviewed-on: https://go-review.googlesource.com/9672Reviewed-by: default avatarDave Cheney <dave@cheney.net>
Run-TryBot: Minux Ma <minux@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent c573a9cb
...@@ -178,14 +178,14 @@ func forkAndExecInChild(argv0 *byte, argv, envv []*byte, chroot, dir *byte, attr ...@@ -178,14 +178,14 @@ func forkAndExecInChild(argv0 *byte, argv, envv []*byte, chroot, dir *byte, attr
} }
if sys.Foreground { if sys.Foreground {
pgrp := sys.Pgid pgrp := int32(sys.Pgid)
if pgrp == 0 { if pgrp == 0 {
r1, _, err1 = RawSyscall(SYS_GETPID, 0, 0, 0) r1, _, err1 = RawSyscall(SYS_GETPID, 0, 0, 0)
if err1 != 0 { if err1 != 0 {
goto childerror goto childerror
} }
pgrp = int(r1) pgrp = int32(r1)
} }
// Place process group in foreground. // Place process group in foreground.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment