<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Dec 15, 2014 at 9:11 AM, Henk-Jan van Tuyl <span dir="ltr"><<a href="mailto:hjgtuyl@chello.nl" target="_blank">hjgtuyl@chello.nl</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div id=":1si" class="" style="overflow:hidden">I am experimenting with the createProcess function from the package "process"; this function does not return any handle, on both Ubuntu and Windows. I am doing something wrong, or is this a bug? (I am using GHC 7.8.3 on both platforms.)<br></div></blockquote></div><br>Not a bug; you need to tell it which ones to create handles for.</div><div class="gmail_extra"><br></div><div class="gmail_extra"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><p style="margin:0.8em 0px;padding:0px;color:rgb(0,0,0);font-family:sans-serif;font-size:13px;line-height:18.2000007629395px"><code style="margin:0px;padding:0px;line-height:16.1200008392334px"><a href="http://lambda.haskell.org/platform/doc/current/ghc-doc/libraries/process-1.1.0.2/System-Process.html#v:createProcess" style="margin:0px;padding:0px;text-decoration:none;color:rgb(171,105,84)">createProcess</a></code> returns <code style="margin:0px;padding:0px;line-height:16.1200008392334px">(mb_stdin_hdl, mb_stdout_hdl, mb_stderr_hdl, p)</code>, where</p><ul style="margin:0.8em 0px 0.8em 2em;padding:0px;color:rgb(0,0,0);font-family:sans-serif;font-size:13px;line-height:18.2000007629395px"><li style="margin:0px;padding:0px">if <code style="margin:0px;padding:0px;line-height:16.1200008392334px">std_in == CreatePipe</code>, then <code style="margin:0px;padding:0px;line-height:16.1200008392334px">mb_stdin_hdl</code> will be <code style="margin:0px;padding:0px;line-height:16.1200008392334px">Just h</code>, where <code style="margin:0px;padding:0px;line-height:16.1200008392334px">h</code> is the write end of the pipe connected to the child process's <code style="margin:0px;padding:0px;line-height:16.1200008392334px">stdin</code>.</li><li style="margin:0px;padding:0px">otherwise, <code style="margin:0px;padding:0px;line-height:16.1200008392334px">mb_stdin_hdl == Nothing</code></li></ul><p style="margin:0.8em 0px;padding:0px;color:rgb(0,0,0);font-family:sans-serif;font-size:13px;line-height:18.2000007629395px">Similarly for <code style="margin:0px;padding:0px;line-height:16.1200008392334px">mb_stdout_hdl</code> and <code style="margin:0px;padding:0px;line-height:16.1200008392334px">mb_stderr_hdl</code>.</p></blockquote><div><br></div><div>The default action is to inherit the existing handles for stdin/out/err in the subprocess and provide no handles to the caller; this mirrors the default behavior of creating a new process on Windows and POSIX.</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>brandon s allbery kf8nh                               sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>                                  <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div><div>unix, openafs, kerberos, infrastructure, xmonad        <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div></div>
</div></div>