You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but that channel is unbuffered, which means that if signals are sent before the channel is read from, they'll be dropped.
The docs for os/signal.Notify at https://golang.org/pkg/os/signal/#Notify explicitly call this out
In Go1.17, I plan on producing a static analyzer that'll automatically flag these when go test runs, but my company will release it even earlier as per golang/go#9399.
For Admin Use
Not duplicate issue
Appropriate labels applied
Appropriate contributors tagged
Contributor assigned/self-assigned
The text was updated successfully, but these errors were encountered:
Invoking:
c := make(chan os.Signal)
signal.Notify(c, signals...)
is explicitly called out as a bug in the os/signal docs
and should instead make that channel buffered lest
a signal could be lost.
Fixes#7950
…7952)
Invoking:
c := make(chan os.Signal)
signal.Notify(c, signals...)
is explicitly called out as a bug in the os/signal docs
and should instead make that channel buffered lest
a signal could be lost.
Fixes#7950
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Noticed while auditing and testing code, as of tip at be10bcb, the code in x/simulation looks like this
cosmos-sdk/x/simulation/simulate.go
Lines 104 to 106 in be10bcb
but that channel is unbuffered, which means that if signals are sent before the channel is read from, they'll be dropped.
The docs for os/signal.Notify at https://golang.org/pkg/os/signal/#Notify explicitly call this out
In Go1.17, I plan on producing a static analyzer that'll automatically flag these when go test runs, but my company will release it even earlier as per golang/go#9399.
For Admin Use
The text was updated successfully, but these errors were encountered: