Skip to content

Instantly share code, notes, and snippets.

@machinaut
Created June 14, 2010 20:12
Show Gist options
  • Save machinaut/438230 to your computer and use it in GitHub Desktop.
Save machinaut/438230 to your computer and use it in GitHub Desktop.
// error is :
// sigexample.go:12: case 17 (type signal.UnixSignal) in signal.Signal switch
package main
import (
"os/signal"
)
func signalHandler() {
for sig := range signal.Incoming {
switch sig {
case signal.SIGCHLD:
break
default:
panic(sig.String())
}
}
}
func main() {
go signalHandler()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment