19 lines
231 B
Go
19 lines
231 B
Go
package curre
|
|
|
|
import (
|
|
"os"
|
|
"os/signal"
|
|
"syscall"
|
|
)
|
|
|
|
type Lifetime func() int
|
|
|
|
func ConsoleLifetime() int {
|
|
signals := make(chan os.Signal, 1)
|
|
signal.Notify(signals, syscall.SIGINT, syscall.SIGTERM)
|
|
|
|
<-signals
|
|
|
|
return OK
|
|
}
|