[GHC] #8343: Interrupting readProcess doesn't work

#8343: Interrupting readProcess doesn't work --------------------------+------------------------------------------------ Reporter: akio | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: | Version: 7.6.3 libraries/base | Operating System: Linux Keywords: | Type of failure: Incorrect result at runtime Architecture: x86_64 | Test Case: (amd64) | Blocking: Difficulty: | Unknown | Blocked By: | Related Tickets: #5766 | --------------------------+------------------------------------------------ The following program should terminate in 1 second, but it does not: {{{ import System.Process import System.Timeout main = timeout 1000000 $ print =<< readProcess "sleep" ["2h"] "" }}} The problem is in the exception handler in {{{readProcess}}}. When it receives an asynchronous exception, it tries to clean up by closing the pipes. However the attempt to close {{{outh}}} blocks because the reader thread (reading with {{{hGetContents}}}) is blocking on the handle. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8343 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8343: Interrupting readProcess doesn't work ------------------------------------------------+-------------------------- Reporter: akio | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: libraries/base | Version: 7.6.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Incorrect result at runtime | (amd64) Test Case: | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: #5766 ------------------------------------------------+-------------------------- Changes (by akio): * status: new => patch -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8343#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8343: Interrupting readProcess doesn't work ------------------------------------------------+-------------------------- Reporter: akio | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: libraries/process | Version: 7.6.3 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Incorrect result at runtime | (amd64) Test Case: | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: #5766 ------------------------------------------------+-------------------------- Changes (by akio): * component: libraries/base => libraries/process -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8343#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8343: Interrupting readProcess doesn't work ------------------------------------------------+-------------------------- Reporter: akio | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: libraries/process | Version: 7.6.3 Resolution: fixed | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Incorrect result at runtime | (amd64) Test Case: tests/T8343 | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: #5766 ------------------------------------------------+-------------------------- Changes (by thoughtpolice): * status: patch => closed * testcase: => tests/T8343 * resolution: => fixed Comment: Merged, thanks! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8343#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC