---
title: "unbuffered-signal-channel"
description: "Detect unbuffered channels used for signal notification."
image: "https://strider.gempir.com/og.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://strider.gempir.com/llms.txt
> Use this file to discover all available pages before exploring further.

# unbuffered-signal-channel

**Default severity:** `warning`

The `os/signal` package uses non-blocking sends to deliver notifications. If
no receiver is immediately ready, an unbuffered channel drops the signal.
Give the channel enough capacity for the signals being handled.

## Bad

```go
ch := make(chan os.Signal)
signal.Notify(ch, os.Interrupt)
```

## Good

```go
ch := make(chan os.Signal, 1)
signal.Notify(ch, os.Interrupt)
```

Source: https://strider.gempir.com/analyzers/unbuffered-signal-channel/index.mdx
