Problem with ghc on Windows ME

C.Reinke C.Reinke at kent.ac.uk
Thu Jan 29 18:50:28 EST 2004


> No, the effect is that the arguments are passed unmodified to the
> program.  The implementation of rawSystem might have to do some
> compensation under the hood (eg. on Windows), but that's not visible to
> the client.

As I've learned to interpret the uncompensated arguments, I'd prefer
a rawSystem without compensation, on the grounds that it'll work as
anything else on this system, with more backslashes, but only one
possible source of bugs instead of two. But that's just my preference.

> This is an unfortunate situation, granted.  ghc-6.0.x had a version of
> rawSystem that was not very raw: on Windows there was a layer of
> translation between rawSystem and the invoked program, and on Unix it
> didn't even allow you to pass any arguments to the program.  We thought
> this was wrong, and decided to make rawSystem truly raw.

The translation layer is standard on Windows, isn't it?  Of course,
rawSystem needs to be in a form that works on Unix as well.

> Unfortunately we got it slightly wrong in 6.2.  6.2.1 will be better (I
> hope), and in the meantime we can offer an implementation of rawSystem
> that you can use locally to work around the differences - how does that
> sound?

In released software, I'm using only system so far, so won't be
affected negatively.  But I still haven't managed to work around the
"works in win98"/"fails in winXP" problem I mentioned, and have so
far avoided trying rawSystem because of the version problem. If you
can offer a workaroung to the version problem, I'll try whether
rawSystem is any help in my case.

Generally, it'd be great if working code would less often break with
new releases (oh, and a portable popen2, while we're at it!-).

> I don't think it's necessary to do any of this, if rawSystem works as
> it's intended.  But I may have misunderstood your intention...

My intention was to get access both to the raw rawSystem and to the
compensating rawSystem. Exporting both would be a simpler option.

Cheers,
Claus

PS. On Windows98, System.system always returns ExitSuccess. Is there 
    a way of fixing that, or at least return ExitFailure instead of 
    ExitSuccess, to alert unsuspecting testers to the problem?


More information about the Glasgow-haskell-users mailing list