File: issue419.go

package info (click to toggle)
delve 1.26.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 15,136 kB
  • sloc: ansic: 111,947; sh: 194; asm: 147; makefile: 43; python: 23
file content (24 lines) | stat: -rw-r--r-- 280 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package main

import (
	"fmt"
	"os"
	"os/signal"
)

func main() {

	fmt.Println("Start")

	sc := make(chan os.Signal, 1)

	//os.Interrupt, os.Kill
	signal.Notify(sc, os.Interrupt, os.Kill)

	quit := <-sc

	fmt.Printf("Receive signal %s \n", quit.String())

	fmt.Println("End")

}