On Friday, 8 April 2016 at 15:31:13 UTC, Puming wrote:
The D version behavior is strange.
Are you still calling bash? Cuz that is going to complicate things a lot because bash does its own signal handling too and could be intercepting it.
When Using while with readln, after hitting Ctrl-C, the next readln will throw exception:
This is normal though. If a signal interrupts a read/write call, it returns an error saying it was interrupted so you can choose to abort or try again. (this way you can catch ctrl+c to cancel input)