Skip to Content
Hands-On Software Engineering with Golang
book

Hands-On Software Engineering with Golang

by Achilleas Anagnostopoulos
January 2020
Intermediate to advanced
640 pages
16h 56m
English
Packt Publishing
Content preview from Hands-On Software Engineering with Golang

Terminating the application in a clean way

At this point, you are probably wondering: how does the application terminate? The answer is by receiving a signal from the operating system. The signal package in the Go standard library comes with a Notify function that allows an application to register for, and receive, notifications when the application receives a particular signal type. Common signal types include the following:

  • SIGINT, which is normally sent to a foreground application when the user presses Ctrl + C.
  • SIGHUP, which many applications (for example, HTTP servers) hook and use as a trigger to reload their configuration.
  • SIGKILL, which is sent to an application before the operating system kills it. This particular signal cannot ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Software Architecture with Golang

Hands-On Software Architecture with Golang

Jyotiswarup Raiturkar

Publisher Resources

ISBN: 9781838554491Supplemental Content