gcc/testsuite/go.test/test/sigchld.go
raw| 1 | // +build !plan9,!windows |
| 2 | // run |
| 3 | |
| 4 | // Copyright 2009 The Go Authors. All rights reserved. |
| 5 | // Use of this source code is governed by a BSD-style |
| 6 | // license that can be found in the LICENSE file. |
| 7 | |
| 8 | // Test that a program can survive SIGCHLD. |
| 9 | |
| 10 | package main |
| 11 | |
| 12 | import "syscall" |
| 13 | |
| 14 | func main() { |
| 15 | syscall.Kill(syscall.Getpid(), syscall.SIGCHLD) |
| 16 | println("survived SIGCHLD") |
| 17 | } |