code: func catchSignal(fd []uintptr, sig chan os.Signal) {
  	select {
  	case <-sig:
  		echoOn(fd)
  		os.Exit(2)
  	}
  }
docs: // catchSignal tries to catch SIGKILL, SIGQUIT and SIGINT so that we can turn terminal
  // echo back on before the program ends.  Otherwise the user is left with echo off on
  // their terminal.