|
RE: win98, ctrl-c & System.system (was: Updated 6.4 Windows installer RC): msg#00140lang.haskell.glasgow.bugs
On 23 March 2005 15:34, Sigbjorn Finne wrote: > "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? Because we want to get a ProcessHandle that we can wait on, and system() doesn't give us that. What's the right way to do this on Win98? If COMMAND.EXE doesn't support /c, there must be an alternative... perhaps I should just look up the implementation of system() in msvcrt? Cheers, Simon
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: win98, ctrl-c & System.system (was: Updated 6.4 Windows installer RC), Simon Marlow |
|---|---|
| Next by Date: | [ ghc-Bugs-1169235 ] internat error: sth_ap_v_ret, SourceForge.net |
| Previous by Thread: | RE: win98, ctrl-c & System.system (was: Updated 6.4 Windows installer RC), Simon Marlow |
| Next by Thread: | [ ghc-Bugs-1169235 ] internat error: sth_ap_v_ret, SourceForge.net |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |