Picking a shell for runCommand

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Picking a shell for runCommand

Tom Hawkins-2
It appears runCommand uses /bin/sh by default, but  our environment
needs tcsh.  Is there any way to set an alternative shell?

-Tom
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Picking a shell for runCommand

Donn Cave-2
On Tue, 28 Feb 2006, Tom Hawkins wrote:
> It appears runCommand uses /bin/sh by default, but  our environment
> needs tcsh.  Is there any way to set an alternative shell?

Ideally, it would be better to fix your environment, but something
like this should work if you can't do that -

    runSh cmd = runProcess "/bin/tcsh" ["-c", cmd] Nothing Nothing
                Nothing Nothing Nothing

The 2nd parameter is argv with argv[0] gratuitously removed.

        Donn Cave, [hidden email]

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe