Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via email, send a message with subject or
body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. Allowing multiple FDs with createProcess (Swaren)
----------------------------------------------------------------------
Message: 1
Date: Sat, 14 Feb 2026 00:35:31 +0000
From: Swaren <[email protected]>
Subject: [Haskell-beginners]Allowing multiple FDs with createProcess
To: [email protected]
Message-ID:
<[email protected]>
Content-Type: text/plain; charset=utf-8
Hi!
I'm new to Haskell, and I have a problem with the `createProcess` function
(used to spawn a new Unix process) and FDs.
The function takes a `CreateProcess` data structure, which contains `std_in`,
`std_err` and `std_out`, plus other unrelated parameters. These std parameters
allow to give specific file descriptors to the child process (0, 1 and 2, which
are the standard std FDs). This feature allows to capture the output of
processes, or provide them input, by giving them a pipe as std_in and std_out,
for example.
Now, is there a way to define other file descriptors? Like, having 5 more input
pipes for the process to use. Currently, the `CreateProcess` API seems to be
limited to the first three FDs.
I could disable the `close_fds` arg of `CreateProcess`, so that all the FDs are
given to the process, but that's not truly a solution as it allows the process
to access other FDs of my program.
Maybe there's a library for that, tell me, but I'd like to keep it the most
"native" / built-in as possible.
(plus, for some reason, it would be a pain to install a proper Haskell
toolchain on my Frankenstein-like Linux machine)
Hope it's clear enough, thanks!
------------------------------
Subject: Digest Footer
_______________________________________________
Beginners mailing list -- [email protected]
To unsubscribe send an email to [email protected]
------------------------------
End of Beginners Digest, Vol 179, Issue 2
*****************************************