run..Process borrow handles and escape argumentes -
simonmarhaskell at gmail.com
Mon Apr 23 05:41:18 EDT 2007
Marc Weber wrote:
> Couldn't find a function which does this:
> use stdin/out/err of the main application and escapes the passed arguments
> I want to call "ssh user at host command"
> (runCommand :: String -> IO () )
> command may contain redirection > so I would have to escape them.
> I don't want to have to do that
> I can pass a list of args to
> runProcess.. fine. So I can use
> runProcess ... (Just stdin) (Just stdout) ... to borrow the handles ?
> No: the comments say:
> -- Any 'Handle's passed to 'runProcess' are placed immediately in the
> closed state.
> That's not what I want.
> So I think there is still a function missing ?
> Cale has pointed me to hsh so I'll have a look there..
Perhaps you just want to pass Nothing for the "Maybe Handle" arguments to
runProcess, which means "inherit from the parent process"?
More information about the Libraries