logo       

Re: win98, ctrl-c & System.system (was: Updated 6.4 Windows installer RC): msg#00136

lang.haskell.glasgow.bugs

Subject: Re: win98, ctrl-c & System.system (was: Updated 6.4 Windows installer RC)

"Simon Marlow" <simonmar@xxxxxxxxxxxxx> writes:

...
Prelude> System.system "ls" >>= print
*** Exception: C:\WINDOWS\SYSTEM\CMD.EXE: runCommand: does not exist
(No such fi le or directory)
Prelude> System.Cmd.rawSystem "ls" [] >>= print
_viminfo getname.pl index.html
ExitSuccess
Prelude> System.system "false" >>= print
*** Exception: C:\WINDOWS\SYSTEM\CMD.EXE: runCommand: does not exist
(No such fi le or directory)
Prelude> System.Cmd.rawSystem "false" [] >>= print
ExitFailure 1

Works for me! Remember that System.system is executing CMD.EXE, not
Cygwin bash, so it'll probably have a different PATH and might not be
able to find your Cygwin binaries. Both System.system "dir", and
System.system "c:/cygwin/bin/ls" work for me.


There's no such thing as cmd.exe on Win9x, it's COMMAND.EXE/COM.
Some System.Process.* code ought to be looking at the COMSPEC env
variable and not hard-code the name of the command processor. However,
I don't think COMMAND.EXE supports the /c switch...why the switch away
from just using libc/msvcrt's system() for System.system?

--sigbjorn


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise