diff options
author | Russ Cox <rsc@golang.org> | 2009-05-08 16:36:46 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-05-08 16:36:46 -0700 |
commit | 474c3cee0efe74fe7c6d2758d2c9508d3d9610e3 (patch) | |
tree | 47fe78b54d44a5cd88eeca285b7f918b61cdd2e6 /src/lib/os/proc_darwin.go | |
parent | 3ee3088cbdf6bd3047534471e2d706ad2a04840f (diff) | |
download | golang-474c3cee0efe74fe7c6d2758d2c9508d3d9610e3.tar.gz |
use exitgroup on linux to exit whole process.
R=r
DELTA=60 (38 added, 19 deleted, 3 changed)
OCL=28589
CL=28589
Diffstat (limited to 'src/lib/os/proc_darwin.go')
-rw-r--r-- | src/lib/os/proc_darwin.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/lib/os/proc_darwin.go b/src/lib/os/proc_darwin.go new file mode 100644 index 000000000..bae977b1f --- /dev/null +++ b/src/lib/os/proc_darwin.go @@ -0,0 +1,20 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package os + +import ( + "os"; + "syscall"; +) + +var Args []string; // provided by runtime +var Envs []string; // provided by runtime + +// Exit causes the current program to exit with the given status code. +// Conventionally, code zero indicates success, non-zero an error. +func Exit(code int) { + syscall.Syscall(syscall.SYS_EXIT, int64(code), 0, 0) +} + |