Message:
Hello golan...@googlegroups.com (cc: golan...@googlegroups.com),
I'd like you to review this change to
https://go.googlecode.com/hg/
Description:
os: make Wait return on SIGSTOP on linux
Fixes issue 3111.
Please review this at http://codereview.appspot.com/5700045/
Affected files:
M src/pkg/os/exec_unix.go
Index: src/pkg/os/exec_unix.go
===================================================================
--- a/src/pkg/os/exec_unix.go
+++ b/src/pkg/os/exec_unix.go
@@ -21,7 +21,7 @@
}
var status syscall.WaitStatus
var rusage syscall.Rusage
- pid1, e := syscall.Wait4(p.Pid, &status, 0, &rusage)
+ pid1, e := syscall.Wait4(p.Pid, &status, syscall.WSTOPPED, &rusage)
if e != nil {
return nil, NewSyscallError("wait", e)
}
On Thu, 23 Feb 2012, minux wrote:
> issue description: s/linux/unix/, this is not linux specific change.
>
> Why not add WCONTINUED and WUNTRACED as well?
>
--
Scott Lawrence
Linux jagadai 3.2.5-1-ARCH #1 SMP PREEMPT Tue Feb 7 08:34:36 CET 2012 x86_64 Intel(R) Core(TM)2 Duo CPU P8700 @ 2.53GHz GenuineIntel GNU/Linux
I understand that it is good to be able to see whether a process has
stopped, but I think there has to be a way to simply wait for a process
to exit. It shouldn't be necessary to call Wait() in a loop.
Ian
--
Package os is for portable behavior, and this is not portable.
Process.Wait is for waiting for a process to be gone, not
for it to SIGSTOP. If you want the latter, use package
syscall directly.
Russ
--