Trap SIGWINCH

188 views
Skip to first unread message

Rob Thornton

unread,
Aug 30, 2012, 2:03:01 PM8/30/12
to golan...@googlegroups.com
I need to handle terminal resizes in an application I'm working on. How would I go about trapping the SIGWINCH signal? It is not defined in syscall. Do I just define a new signal matching the os.Signal interface and pass it to os/signal.Notify()?

Ian Lance Taylor

unread,
Aug 30, 2012, 3:19:08 PM8/30/12
to Rob Thornton, golan...@googlegroups.com
It should be defined in the syscall package. What OS are you using?

You should be able to use http://golang.org/pkg/os/signal/ .

Ian

Rob Thornton

unread,
Aug 31, 2012, 11:10:48 AM8/31/12
to golan...@googlegroups.com, Rob Thornton
It was my bad. Was running godocs off my Windows machine (which did not have it defined). Once I checked it on my Linux machine it was there. Sorry!
Reply all
Reply to author
Forward
0 new messages