Skip to content

createPipe doesn't work on Windows #181

@TerrorJack

Description

@TerrorJack

Example program:

{-# LANGUAGE OverloadedStrings #-}

import qualified Data.ByteString as BS
import System.IO
import System.Process

main :: IO ()
main = do
  (h_read, h_write) <- createPipe
  let msg = "233"
  BS.hPut h_write msg
  hFlush h_write
  BS.hGet h_read (BS.length msg) >>= print

This prints "233" on Linux/macOS, but the program hangs indefinitely on Windows. Tested against ghc-8.10.1 which ships process-1.6.8.2, both on my Windows 10 laptop and on GitHub Actions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions