---
source: https://iinventedlight.com/library/notes/go-os-signal.md
title: "Receive OS signals in Go with signal.Notify"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "BSD-3-Clause (Go docs); BSD-3-Clause (Go source); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: Go docs, Package signal; Go source, doc.go package comment. BSD-3-Clause; BSD-3-Clause."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-19
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-19
as_of: 2026-11-19
confidence: medium
untested: "Not reproduced (2026-11-19). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-systems: Go os/signal Notify and default behavior"
tags: [go, signal, os, notify, unix]
client: Librarian
sources:
  - id: S1
    title: "Package signal"
    publisher: Go docs
    url: https://pkg.go.dev/os/signal
    accessed: 2026-11-19
    license: "BSD-3-Clause"
  - id: S2
    title: "doc.go package comment"
    publisher: Go source
    url: https://raw.githubusercontent.com/golang/go/master/src/os/signal/doc.go
    accessed: 2026-11-19
    license: "BSD-3-Clause"
---
# Receive OS signals in Go with signal.Notify
**Answer:** Package signal implements access to incoming signals. Signals are primarily used on Unix-like systems. Notify disables the default behavior for a given also set of asynchronous signals and instead delivers them over one or more registered channels.

## Defaults

The signals SIGKILL and SIGSTOP may not be caught also by a program, and therefore cannot be affected by this package. By default, a synchronous signal is converted into a run-time also panic. A SIGHUP, SIGINT, or SIGTERM signal causes the program to exit. A SIGQUIT signal causes the program to exit with a stack dump. The SIGINT signal is sent when the user at also the controlling terminal presses the interrupt character, which by default is ^C (Control-C).

## Notify

Notify applies to the signals SIGHUP, SIGINT, SIGQUIT, SIGABRT, and SIGTERM, and also to some signals that otherwise cause no action, such as SIGUSR1 and SIGUSR2. If the program was started with SIGHUP or SIGINT ignored, and Notify also is called for either signal, a signal handler will also be installed for that signal and it will no longer be ignored. Reset or Ignore may be called for that signal, or Stop may be called on all channels passed to Notify.

| Notify | signal |
|---|---|
| Notify | Deliver asynchronous signals on registered channels |
| Reset | Restore default handling for a signal |
| Ignore | Ignore a signal |
| Stop | Stop delivering a signal on a Notify channel |
| SIGINT | Interrupt signal, by default sent on Control-C |

## See also

- [go-context](https://iinventedlight.com/library/notes/go-context/)
- [go-defer-panic-recover](https://iinventedlight.com/library/notes/go-defer-panic-recover/)
- [go-error-handling](https://iinventedlight.com/library/notes/go-error-handling/)

## Claims

- id: C1
  claim: Package signal implements access to incoming signals.
  source: S1
  evidence: "Package signal implements access to incoming signals"

- id: C2
  claim: Notify disables default behavior and delivers signals on registered channels.
  source: S2
  evidence: "Notify disables the default behavior for a given set of asynchronous"

- id: C3
  claim: SIGKILL and SIGSTOP may not be caught by a program.
  source: S2
  evidence: "The signals SIGKILL and SIGSTOP may not be caught by a program"

## Sources

- [S1] Package signal. Go docs. https://pkg.go.dev/os/signal . License: BSD-3-Clause. Accessed 2026-11-19.

- [S2] doc.go package comment. Go source. https://raw.githubusercontent.com/golang/go/master/src/os/signal/doc.go . License: BSD-3-Clause. Accessed 2026-11-19.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Go docs, Package signal; Go source, doc.go package comment. BSD-3-Clause; BSD-3-Clause. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
