getLine and ^C on Windows

Hi folks, I'm using System.IO.getLine to read input in my program. I've compiled it on Windows Vista with ghc-6.10.1. I've noticed that if I press Ctrl+C while the program is waiting for input, it will get stuck. No keypresses can get me out of the program - I have to kill the shell. I've tried cmd.exe, Powershell and cygwin - same behavior. I'm sure editline would work better, but it's overkill. I just want to read lines of text and don't need fancy edit behavior. And I think editline complicates the build process. I also want my program to work right in non-interactive mode, reading redirected input. Am I missing something? Thanks, Lyle

I've had the same experience with runghc in GHC 6.10.1 on Vista.
/g
2008/11/12 Lyle Kopnicky
Hi folks, I'm using System.IO.getLine to read input in my program. I've compiled it on Windows Vista with ghc-6.10.1. I've noticed that if I press Ctrl+C while the program is waiting for input, it will get stuck. No keypresses can get me out of the program - I have to kill the shell. I've tried cmd.exe, Powershell and cygwin - same behavior. I'm sure editline would work better, but it's overkill. I just want to read lines of text and don't need fancy edit behavior. And I think editline complicates the build process. I also want my program to work right in non-interactive mode, reading redirected input. Am I missing something? Thanks, Lyle _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- I am in here

Hi I have the same experience with Windows XP and getContents, so I think it's the entire IO layer on Windows, rather than just getLine on Vista. This is being tracked here http://hackage.haskell.org/trac/ghc/ticket/2758 Thanks Neil
I've had the same experience with runghc in GHC 6.10.1 on Vista.
/g
Hi folks, I'm using System.IO.getLine to read input in my program. I've compiled it on Windows Vista with ghc-6.10.1. I've noticed that if I press Ctrl+C while the program is waiting for input, it will get stuck. No keypresses can get me out of the program - I have to kill
I've tried cmd.exe, Powershell and cygwin - same behavior. I'm sure editline would work better, but it's overkill. I just want to read lines of text and don't need fancy edit behavior. And I think editline complicates the build process. I also want my
2008/11/12 Lyle Kopnicky
: the shell. program to work right in non-interactive mode, reading redirected input. Am I missing something? Thanks, Lyle _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- I am in here _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
============================================================================== Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html ==============================================================================

Mitchell, Neil wrote:
Hi
I have the same experience with Windows XP and getContents, so I think it's the entire IO layer on Windows, rather than just getLine on Vista. This is being tracked here http://hackage.haskell.org/trac/ghc/ticket/2758
Which is now fixed, FYI. 6.10.2 will have the fix. Cheers, Simon
participants (4)
-
J. Garrett Morris
-
Lyle Kopnicky
-
Mitchell, Neil
-
Simon Marlow