[GHC] #8367: putStrLn and related printing functions don't output to MinTTY properly under Windows

#8367: putStrLn and related printing functions don't output to MinTTY properly under Windows ------------------------------------+--------------------------------- Reporter: schyler | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 7.6.3 Keywords: | Operating System: Windows Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+--------------------------------- One place where this glitch can be seen in `cabal update` by it *delaying* the term output until the update is finished and the program terminates. I've noticed it in several of my personal larger projects too. I think what's going on is that nothing is printed to the terminal until the program terminates. It seems to be intermittent to some degree, and varying the size and contents of the program can trigger it. Because of it's indeterminacy I can't actually provide a small test case, however, I can provide a program which currently does produce the issue. https://github.com/kvanberendonck/burrito/blob/ccd8d1fb2bb09251571cf2626314f... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8367 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8367: putStrLn and related printing functions don't output to MinTTY properly under Windows ----------------------------+---------------------------------------------- Reporter: schyler | Owner: schyler Type: bug | Status: new Priority: high | Milestone: Component: Runtime | Version: 7.6.3 System | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: Windows | Difficulty: Moderate (less than a day) Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | Blocking: | ----------------------------+---------------------------------------------- Changes (by schyler): * cc: schyler, simonmar (added) * difficulty: Unknown => Moderate (less than a day) * owner: => schyler * priority: normal => high -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8367#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8367: putStrLn and related printing functions don't output to MinTTY properly
under Windows
----------------------------+----------------------------------------------
Reporter: schyler | Owner: schyler
Type: bug | Status: new
Priority: high | Milestone:
Component: Runtime | Version: 7.6.3
System | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: Windows | Difficulty: Moderate (less than a day)
Type of failure: | Blocked By:
None/Unknown | Related Tickets:
Test Case: |
Blocking: |
----------------------------+----------------------------------------------
Comment (by schyler):
Solved the problem - for some reason it doesn't flush properly on MinTTY.
Consider;
{{{
-- Small case for #8367
import Control.Monad
import System.IO
main
= do -- Print something intelligent
putStrLn $
"People assume that time is a strict progression of cause "
++ "to effect, but *actually* from a non-linear, non-subjective
"
++ "viewpoint - it's more like a big ball of wibbly wobbly "
++ "time-y wimey... stuff."
-- Uncomment this line to see terminal output
-- hFlush stdout
-- Do some pointless logic so the program doesn't terminate and
-- hence we won't see a buffer flush.
forever $ return ()
}}}
{{{
#include

#8367: putStrLn and related printing functions don't output to MinTTY properly under Windows ----------------------------+---------------------------------------------- Reporter: schyler | Owner: schyler Type: bug | Status: closed Priority: high | Milestone: Component: Runtime | Version: 7.6.3 System | Keywords: Resolution: wontfix | Architecture: Unknown/Multiple Operating System: Windows | Difficulty: Moderate (less than a day) Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | Blocking: | ----------------------------+---------------------------------------------- Changes (by schyler): * status: new => closed * resolution: => wontfix -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8367#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8367: putStrLn and related printing functions don't output to MinTTY properly under Windows ----------------------------+---------------------------------------------- Reporter: schyler | Owner: schyler Type: bug | Status: closed Priority: high | Milestone: Component: Runtime | Version: 7.6.3 System | Keywords: Resolution: wontfix | Architecture: Unknown/Multiple Operating System: Windows | Difficulty: Moderate (less than a day) Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | Blocking: | ----------------------------+---------------------------------------------- Comment (by schyler): https://code.google.com/p/mintty/issues/detail?id=56 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8367#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC