mirror of
https://github.com/vbatts/flaming-happiness.git
synced 2025-01-15 10:10:09 +00:00
catch and cleanup on os.Kill too
This commit is contained in:
parent
b4ae9415bb
commit
279a72905d
1 changed files with 1 additions and 0 deletions
|
@ -25,6 +25,7 @@ func init() {
|
||||||
notify.Init("IRC-noti")
|
notify.Init("IRC-noti")
|
||||||
c := make(chan os.Signal, 1)
|
c := make(chan os.Signal, 1)
|
||||||
signal.Notify(c, os.Interrupt)
|
signal.Notify(c, os.Interrupt)
|
||||||
|
signal.Notify(c, os.Kill)
|
||||||
go func() {
|
go func() {
|
||||||
for sig := range c {
|
for sig := range c {
|
||||||
// sig is a ^C, handle it
|
// sig is a ^C, handle it
|
||||||
|
|
Loading…
Reference in a new issue