mirror of https://github.com/golang/go.git
use exitgroup on linux to exit whole process.
R=r DELTA=60 (38 added, 19 deleted, 3 changed) OCL=28589 CL=28589
This commit is contained in:
parent
20850fc014
commit
59be46ca35
|
|
@ -3,7 +3,7 @@
|
|||
# license that can be found in the LICENSE file.
|
||||
|
||||
# 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=
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ coverage: packages
|
|||
|
||||
O1=\
|
||||
error.$O\
|
||||
proc.$O\
|
||||
proc_$(GOOS).$O\
|
||||
types.$O\
|
||||
|
||||
O2=\
|
||||
|
|
@ -61,7 +61,7 @@ phases: a1 a2 a3 a4
|
|||
_obj$D/os.a: phases
|
||||
|
||||
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)
|
||||
|
||||
a2: $(O2)
|
||||
|
|
|
|||
|
|
@ -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_GROUP, int64(code), 0, 0)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue