Skip to content

Commit

Permalink
Fixes #49
Browse files Browse the repository at this point in the history
  • Loading branch information
obscuren committed May 21, 2014
1 parent 3f5b348 commit b902de2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ethereum/repl_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,18 @@ import (

func initReadLine() {
C.rl_catch_sigwinch = 0
C.rl_catch_signals = 0
c := make(chan os.Signal, 1)
signal.Notify(c, syscall.SIGWINCH)
signal.Notify(c, os.Interrupt)
go func() {
for sig := range c {
switch sig {
case syscall.SIGWINCH:
C.rl_resize_terminal()

case os.Interrupt:
C.rl_cleanup_after_signal()
default:

}
Expand Down

0 comments on commit b902de2

Please sign in to comment.