>> <ctrl>-c issues
>Please file a(nother) bug, we'll try to improve things for 6.4.1.

I thought I did?-) or is this list deprecated in favour of sourceforge?

>Strange - command prompt windows should be nice and large and
>scrollable, mine are at least.  Cut-and-paste support is terrible, though. 

oh, they are, just not in windows 98. but c&p works even there.

>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.

System.system used to pick up the current PATH from the cygwin
environment, which is a lot more comfortable. But as I mentioned,
it makes no difference if I use ghci directly, and try pure and absolute
windows paths, or "dir" - it seems as if it doesn't matter at all what 
command it is, nothing gets through. See also the ":!<cmd>" issue,
for which, I assume, ghci uses System.system internally.

>Perhaps rawSystem is using the current PATH setting, which it inherited
>from the bash shell, whereas System.system is starting a new CMD.EXE
>which resets the PATH?  Try System.system "set PATH".

can't, see above. but that would be (a) counterintuitive behaviour,
and (b) a change from previous incarnations of System.system, IIRC.

It is good that at least one of the two works, and better than before
in terms of ExitCode, but .. WAIT A SEC, CMD.EXE ON WIN98???

ah yes, one should read error messages, I guess (see previous emails),
under bash:

Prelude> let system c = System.Cmd.rawSystem "bash" ["-c",c]
Prelude> system "pwd"
/home/unknown
Prelude> system "true" >>= print
ExitSuccess
Prelude> system "false" >>= print
ExitFailure 1

Prelude> let systemC c = System.Cmd.rawSystem "command.com" ["/c",c]
Prelude> systemC "cd"
Angegebenes COMMAND-Verzeichnis ist falsch
Befehl oder Dateiname nicht gefunden.

Prelude> let systemC c = System.Cmd.rawSystem "command.com" ["/c "++c]
Prelude> systemC "cd"
Angegebenes COMMAND-Verzeichnis ist falsch
D:\cygwin\home\unknown

I can't quite figure out how to pass the "/c" option to command.com
(it looks as if rawSystem passes some junk *in addition to* the parameters,
which confuses command.com, and apparently option and parameter
count as *a single* parameter to rawSystem), but this is a lot better than 
what System.system and ":!" do. It seems that someone dropped a 
windows 98 dependency when reimplementing System.system?-)

Prelude> System.Cmd.rawSystem "echo" ["/c","cd"]
/c cd

hmm, no visible junk there, so perhaps the "/c" is interpreted as the
path parameter instead of/as well as an option. over to you.

Cheers,
Claus


_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to