[GHC] #8943: Add System.Process.createPipe

#8943: Add System.Process.createPipe -------------------------------------+------------------------------------- Reporter: tibbe | Owner: Type: feature request | Status: new Priority: normal | Milestone: 7.10.1 Component: libraries/process | Version: 7.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | -------------------------------------+------------------------------------- As agreed in: http://comments.gmane.org/gmane.comp.lang.haskell.libraries/21373 I've validated the patch on OS X, but I need someone to validate on Windows. I originally wrote this code for cabal and tested it on all platforms back then. I no longer have a Windows machine and the imports in `System.Process` are messy enough that someone needs to check that it still builds on Windows. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8943 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8943: Add System.Process.createPipe --------------------------------------+------------------------------------ Reporter: tibbe | Owner: Type: feature request | Status: patch Priority: normal | Milestone: 7.10.1 Component: libraries/process | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: --------------------------------------+------------------------------------ Changes (by tibbe): * status: new => patch -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8943#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

I seem to remember that on Windows there are subtleties to do with whether the pipe ends are inheritable by subprocesses or not. See mkAnonPipe() in the process package for how we deal with this already in
#8943: Add System.Process.createPipe --------------------------------------+------------------------------------ Reporter: tibbe | Owner: Type: feature request | Status: patch Priority: normal | Milestone: 7.10.1 Component: libraries/process | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: --------------------------------------+------------------------------------ Comment (by tibbe): simonmar added this info to the discussion thread: process. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8943#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8943: Add System.Process.createPipe --------------------------------------+------------------------------------ Reporter: tibbe | Owner: Type: feature request | Status: patch Priority: normal | Milestone: 7.10.1 Component: libraries/process | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: --------------------------------------+------------------------------------ Comment (by refold): I get the following error on Windows: {{{ [2 of 3] Compiling System.Process ( System\Process.hs, dist\build\System\Proce ss.o ) C:\program files (x86)\haskell platform\2013.2.0.0\mingw\bin\..\lib\gcc\mingw32\ 4.5.2\..\..\..\..\include\io.h:64:1: parse error on input `{' }}} After renaming `System\Process.hs` to `.hsc` I get: {{{ [2 of 3] Compiling System.Process ( dist\build\System\Process.hs, dist\build\S ystem\Process.o ) SystemProcess.hsc:921:18: Ambiguous occurrence `fdToHandle' It could refer to either `System.Process.fdToHandle', defined at SystemProcess.hsc:926:1 or `System.Process.Internals.fdToHandle', imported from `System.Process.Internals' at SystemP rocess.hsc:69:1-31 (and originally defined in `GHC.IO.Handle.FD') SystemProcess.hsc:922:19: Ambiguous occurrence `fdToHandle' It could refer to either `System.Process.fdToHandle', defined at SystemProcess.hsc:926:1 or `System.Process.Internals.fdToHandle', imported from `System.Process.Internals' at SystemP rocess.hsc:69:1-31 (and originally defined in `GHC.IO.Handle.FD') }}} After removing the `fdToHandle` function and fixing the call sites everything compiles fine, modulo warnings. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8943#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8943: Add System.Process.createPipe --------------------------------------+------------------------------------ Reporter: tibbe | Owner: Type: feature request | Status: patch Priority: normal | Milestone: 7.10.1 Component: libraries/process | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: --------------------------------------+------------------------------------ Comment (by refold): I've attached an updated version of the patch that compiles for me on GHC 7.6.3. Can I help with anything else (e.g. running tests)? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8943#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8943: Add System.Process.createPipe --------------------------------------+------------------------------------ Reporter: tibbe | Owner: Type: feature request | Status: patch Priority: normal | Milestone: 7.10.1 Component: libraries/process | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: --------------------------------------+------------------------------------ Comment (by tibbe): Replying to [comment:4 refold]:
I've attached an updated version of the patch that compiles for me on GHC 7.6.3. Can I help with anything else (e.g. running tests)?
If you could look into the issue Simon mentioned above (which is a Windows-only issue) that would be great. As for testing, if you like you can apply this patch locally and try to have Cabal use this version of `createPipe` instead of the one we have in the cabal repo, tht would be very helpful. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8943#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8943: Add System.Process.createPipe --------------------------------------+------------------------------------ Reporter: tibbe | Owner: Type: feature request | Status: patch Priority: normal | Milestone: 7.10.1 Component: libraries/process | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: --------------------------------------+------------------------------------ Comment (by tibbe): I think this issue is stalled since someone on Windows can figure out the issue simonmar mentioned. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8943#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8943: Add System.Process.createPipe --------------------------------------+------------------------------------ Reporter: tibbe | Owner: Type: feature request | Status: patch Priority: normal | Milestone: 7.10.1 Component: libraries/process | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: --------------------------------------+------------------------------------ Comment (by refold): I'll look into it once I get some free time. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8943#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8943: Add System.Process.createPipe -------------------------------------+------------------------------------- Reporter: tibbe | Owner: Type: feature | Status: upstream request | Milestone: 7.10.1 Priority: normal | Version: 7.6.3 Component: | Keywords: libraries/process | Architecture: Unknown/Multiple Resolution: | Difficulty: Unknown Operating System: | Blocked By: Unknown/Multiple | Related Tickets: Type of failure: | None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: patch => upstream -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8943#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC