github.com/miolini/go@v0.0.0-20160405192216-fca68c8cb408/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  }