From: Austin Clements Date: Tue, 14 Jul 2009 02:28:00 +0000 (-0700) Subject: Avoid clash between os.WRUSAGE and Linux's WALL flag. X-Git-Tag: weekly.2009-11-06~1165 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=ffb4b0d7b7002faf03ddca0afa8527fd37a7f055;p=gostls13.git Avoid clash between os.WRUSAGE and Linux's WALL flag. R=rsc APPROVED=rsc DELTA=5 (4 added, 0 deleted, 1 changed) OCL=31564 CL=31567 --- diff --git a/src/pkg/os/exec.go b/src/pkg/os/exec.go index a7430ef7f7..9ae81c0d5a 100644 --- a/src/pkg/os/exec.go +++ b/src/pkg/os/exec.go @@ -70,9 +70,13 @@ const ( WNOHANG = syscall.WNOHANG; // Don't wait if no process has exited. WSTOPPED = syscall.WSTOPPED; // If set, status of stopped subprocesses is also reported. WUNTRACED = WSTOPPED; - WRUSAGE = 1<<30; // Record resource usage. + WRUSAGE = 1<<20; // Record resource usage. ) +// WRUSAGE must not be too high a bit, to avoid clashing with Linux's +// WCLONE, WALL, and WNOTHREAD flags, which sit in the top few bits of +// the options + // Wait waits for process pid to exit or stop, and then returns a // Waitmsg describing its status and an Error, if any. The options // (WNOHANG etc.) affect the behavior of the Wait call.