[activator-1.2.3] - cygwin bash can't display anything while typing after exit from activator

267 views
Skip to first unread message

keepscoding

unread,
Jul 25, 2014, 1:40:13 AM7/25/14
to play-fr...@googlegroups.com

When i run activator from my play project and then ctrl+D to exit from activator, I continue to use cygwin bash for other commands or relaunch my play.

Then when i try to type, i can't see the characters\text\command that i'm typing. When i hit enter, i can see the bash responsed to what i've typed. 

Anyone has this problem( James, do u) ? I asked around ppl using cygwin bash. they have not encountered this problem from thier project(not doing play or using activator). 

I'm using cygwin 64bit win8.1 pro.

keepscoding

unread,
Jul 26, 2014, 10:05:30 PM7/26/14
to play-fr...@googlegroups.com
isn't got to do with this in activator when exit?

  local exit_code=$?
  if is_cygwin; then
    stty icanon echo > /dev/null 2>&1
  fi
  exit $exit_code
}

keepscoding

unread,
Nov 2, 2014, 1:06:06 AM11/2/14
to play-fr...@googlegroups.com
soweone pointed out to me in stackoverflow.. that below line causes the problem... i think activator exit without un-silent back the cywin...

stty -icanon min 1 -echo > /dev/null 2>&1

keepscoding

unread,
Nov 2, 2014, 1:08:41 AM11/2/14
to play-fr...@googlegroups.com
Tested.. it is the culprit...

liltitus27

unread,
Feb 26, 2015, 2:56:12 PM2/26/15
to play-fr...@googlegroups.com
Have you figured out a workaround for this?  i love to use cygwin, but having to restart it after every 'activator' command is a bit much...

Michael Slinn

unread,
Feb 27, 2015, 2:25:30 PM2/27/15
to play-fr...@googlegroups.com
Try typing one of these next time the problem occurs:

stty sane

or (this is a heavier hammer)

reset

keepscoding

unread,
Jun 2, 2015, 10:42:57 PM6/2/15
to play-fr...@googlegroups.com
No. Still the same problem unless u comment the line i mentioned.

timis...@gmail.com

unread,
Jun 19, 2015, 3:34:15 AM6/19/15
to play-fr...@googlegroups.com
I've been working on my own script which uses stty -icanon command mentioned earlier.  I found to restore terminal functionality after setting non canonical read, the terminal settings had to be saved beforehand. Doing a 'stty sane' did not work.  Here's some example code

SAVE_TERM="$(stty -g)"       # save terminal settings
stty -icanon                             # non canonical read 
stty $SAVE_TERM                # restore terminal settings

If the user does ctr-c, you can add 

trap "stty $SAVE_TERM" SIGINT SIGTERM

Som Snytt

unread,
Jun 19, 2015, 10:40:31 AM6/19/15
to play-fr...@googlegroups.com
The regular scala runner script does this, as well.


--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/c3d1f56b-4097-4769-8930-6fe7ddaa426b%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Michael Slinn

unread,
Jun 20, 2015, 6:54:25 PM6/20/15
to play-fr...@googlegroups.com
I also find the same problem with Activator 1.3.4 on Cygwin. Is there a patched script somewhere that fixes this problem?
Reply all
Reply to author
Forward
0 new messages