Neil Mitchell wrote:

I think I'm confused. I thought Ctrl+C was "abort the program now", so
figured that foo >> bar, where foo get's a Ctrl+C means bar is never
executed? The double buffering thing I can understand, but the fact
that bar gets executed at all is a little confusing.

What if I did:

system "cp foo foo.bup" >> deleteFile "foo"

If I Ctrl+C during the cp did I just delete my one copy of foo?

On Windows, Ctrl-C will unblock a blocked system call. e.g. read() returns with zero. Apparently system "foo" also returns as soon as you press Ctrl-C, I'm not entirely sure why. Perhaps because the program has been killed?

Cheers,
        Simon


Thanks

Neil

On Thu, Mar 12, 2009 at 10:18 AM, GHC <t...@galois.com> wrote:
#3081: Double output after Ctrl+C on Windows
-------------------------------+--------------------------------------------
   Reporter:  NeilMitchell    |        Owner:
       Type:  bug             |       Status:  new
   Priority:  normal          |    Milestone:  _|_
  Component:  Runtime System  |      Version:  6.10.1
   Severity:  normal          |   Resolution:
   Keywords:                  |   Difficulty:  Unknown
   Testcase:                  |           Os:  Windows
Architecture:  x86             |
-------------------------------+--------------------------------------------
Changes (by simonmar):

 * owner:  simonmar =>

--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3081#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to