#5477: Missing space in Windows cmd.exe invocation breaks shell command
invocation
on Wine
---------------------------------+------------------------------------------
Reporter: A1kmm | Owner:
Type: bug | Status: new
Priority: normal | Component: libraries/process
Version: 7.2.1 | Keywords:
Testcase: | Blockedby:
Os: Windows | Blocking:
Architecture: Unknown/Multiple | Failure: Incorrect result at runtime
---------------------------------+------------------------------------------
Consider this code example:
{{{
import System.Process
main = system "ghc --version"
}}}
When compiled and run on Wine, using process-1.1.0.0 or the latest version
pushed to the git repository at the time of writing, the result is a
cmd.exe prompt appears, rather than giving the current ghc version; the
program exits when exit is typed into the shell without displaying the ghc
version.
The reason for this is that System/Process/Internals.hs builds the command
line like this: translate cmd ++ "/c " ++ string
The fact that there is no space between the path to cmd.exe and the /c
argument causes Wine to ignore the /c flag (which would otherwise tell it
to execute a command from the command line, rather than run in interactive
mode).
I attach a patch which fixes this problem.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5477>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs