-
-
Notifications
You must be signed in to change notification settings - Fork 217
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Hi. I found an issue with using os.Notify along with pterm.
This code will wait 10 seconds after receiving Ctrl+C
package main
import (
"os"
"os/signal"
"syscall"
"time"
)
func main() {
sig := make(chan os.Signal)
signal.Notify(sig, os.Interrupt, syscall.SIGTERM)
<-sig
<-time.After(time.Second * 10)
}but after just adding an import with pterm it will close immediately
package main
import (
"os"
"os/signal"
"syscall"
"time"
_ "github.com/pterm/pterm"
)
func main() {
sig := make(chan os.Signal)
signal.Notify(sig, os.Interrupt, syscall.SIGTERM)
<-sig
<-time.After(time.Second * 10)
}My environment:
- pterm version: v0.12.61
- go version: v1.20.4
- os: Ubuntu 23.04
Problem is probably related to
Line 42 in 4b7a4ed
| os.Exit(0) |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working