Commit 59be46ca authored by Russ Cox's avatar Russ Cox

use exitgroup on linux to exit whole process.

R=r
DELTA=60  (38 added, 19 deleted, 3 changed)
OCL=28589
CL=28589
parent 20850fc0
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# license that can be found in the LICENSE file. # license that can be found in the LICENSE file.
# DO NOT EDIT. Automatically generated by gobuild. # DO NOT EDIT. Automatically generated by gobuild.
# gobuild -m dir_${GOARCH}_${GOOS}.go env.go error.go file.go proc.go stat_${GOARCH}_${GOOS}.go time.go types.go exec.go >Makefile # gobuild -m dir_${GOARCH}_${GOOS}.go env.go error.go file.go proc_${GOOS}.go stat_${GOARCH}_${GOOS}.go time.go types.go exec.go >Makefile
D= D=
...@@ -41,7 +41,7 @@ coverage: packages ...@@ -41,7 +41,7 @@ coverage: packages
O1=\ O1=\
error.$O\ error.$O\
proc.$O\ proc_$(GOOS).$O\
types.$O\ types.$O\
O2=\ O2=\
...@@ -61,7 +61,7 @@ phases: a1 a2 a3 a4 ...@@ -61,7 +61,7 @@ phases: a1 a2 a3 a4
_obj$D/os.a: phases _obj$D/os.a: phases
a1: $(O1) a1: $(O1)
$(AR) grc _obj$D/os.a error.$O proc.$O types.$O $(AR) grc _obj$D/os.a error.$O proc_$(GOOS).$O types.$O
rm -f $(O1) rm -f $(O1)
a2: $(O2) a2: $(O2)
......
// 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_GROUP, int64(code), 0, 0)
}
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