|
Sometimes we’d like our Go programs to intelligently
handle Unix signals.
For example, we might want a server to gracefully
shutdown when it receives a |
|
![]()
|
|
|
|
|
|
|
|
|
|
The program will wait here until one of the configured signals is received. |
|
|
|
|
|
When we run this program it will block waiting for a
signal. By typing |
|
Next example: Exit.