github.com/aloncn/graphics-go@v0.0.1/src/runtime/testdata/testprog/signal.go (about)

     1  // Copyright 2015 The Go Authors.  All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // +build !windows,!plan9,!nacl
     6  
     7  package main
     8  
     9  import "syscall"
    10  
    11  func init() {
    12  	register("SignalExitStatus", SignalExitStatus)
    13  }
    14  
    15  func SignalExitStatus() {
    16  	syscall.Kill(syscall.Getpid(), syscall.SIGTERM)
    17  }