Created
June 14, 2010 20:12
-
-
Save machinaut/438230 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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