os/signal (on golang.org and go.dev)
imports 3 packages, and imported by 0 packages
Involved Source Files
Exported Type Names
Ignore causes the provided signals to be ignored. If they are received by
the program, nothing will happen. Ignore undoes the effect of any prior
calls to Notify for the provided signals.
If no signals are provided, all incoming signals will be ignored.
(c chan<- os
, sig ...os
Notify causes package signal to relay incoming signals to c.
If no signals are provided, all incoming signals will be relayed to c.
Otherwise, just the provided signals will.
Package signal will not block sending to c: the caller must ensure
that c has sufficient buffer space to keep up with the expected
signal rate. For a channel used for notification of just one signal value,
a buffer of size 1 is sufficient.
It is allowed to call Notify multiple times with the same channel:
each call expands the set of signals sent to that channel.
The only way to remove signals from the set is to call Stop.
It is allowed to call Notify multiple times with different channels
and the same signals: each channel receives copies of incoming
Reset undoes the effect of any prior calls to Notify for the provided
If no signals are provided, all signal handlers will be reset.
(c chan<- os
Stop causes package signal to stop relaying incoming signals to c.
It undoes the effect of all prior calls to Notify using c.
When Stop returns, it is guaranteed that c will receive no more signals.
||The pages are generated with Golds v0.1.7. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project and developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.|