This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Ctrl+c signal on Cygwin
- From: Dean Schulze <dean dot w dot schulze at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 29 Apr 2014 20:37:32 -0600
- Subject: Ctrl+c signal on Cygwin
- Authentication-results: sourceware.org; auth=none
The golang code below doesn't detect any signals when run on cygwin and
I hit Ctrl+c. When I run it from a DOS shell it does catch a signal
when from Ctrl+c.
What kind of signal does Cygwin send when Ctrl+c is typed?
func main() {
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt)
go func(){
for sig := range c {
fmt.Println(sig.String())
}
}()
time.Sleep(5000 * time.Millisecond)
fmt.Println("Done")
}
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple