win98,
ctrl-c & System.system (was: Updated 6.4 Windows installer RC)
Sigbjorn Finne
sof at galois.com
Wed Mar 23 10:33:53 EST 2005
"Simon Marlow" <simonmar at microsoft.com> 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
More information about the Glasgow-haskell-bugs
mailing list