Mark McGranaghan 3a691aa7ac more for #4
2012-10-11 11:08:38 -07:00

10 lines
267 B
Bash

# When we run this program it will block waiting for a
# signal. By typing `ctrl-C` (which the
# terminal shows as `^C`) we can send a `SIGINT` signal,
# causing the program to print `interrupt` and then exit.
$ go run signals.go
awaiting signal
^C
interrupt
exiting